Skip to content

Correctly Handle Unlinked Module Edge Cases - #22977

Merged
A4-Tacks merged 1 commit into
rust-lang:masterfrom
George-Ogden:linked-module-names
Aug 2, 2026
Merged

Correctly Handle Unlinked Module Edge Cases#22977
A4-Tacks merged 1 commit into
rust-lang:masterfrom
George-Ogden:linked-module-names

Conversation

@George-Ogden

@George-Ogden George-Ogden commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Fixes #22976:

  • correctly escape keywords when used as module names
  • display not identifiers using #[path = "..."] syntax

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 1, 2026
Comment thread crates/syntax/src/utils.rs Outdated
Comment thread crates/ide-diagnostics/src/handlers/unlinked_file.rs Outdated
Comment thread crates/ide-diagnostics/src/handlers/unlinked_file.rs
Comment thread Cargo.toml
Comment thread crates/ide-diagnostics/src/handlers/unlinked_file.rs Outdated
Comment thread crates/ide-diagnostics/src/handlers/unlinked_file.rs Outdated
Comment thread crates/ide-diagnostics/src/handlers/unlinked_file.rs Outdated

@A4-Tacks A4-Tacks left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Suggest squash some commits, as there are too many useless commits

View changes since this review

Escape keywords when used as module names
Display modules with non-identifier names using #[path = "..."] syntax
@George-Ogden

Copy link
Copy Markdown
Contributor Author

Thanks for all your feedback. I've squashed it into one commit. Would it make sense for squash merging to be the default in the future?

@A4-Tacks
A4-Tacks added this pull request to the merge queue Aug 2, 2026
@A4-Tacks

A4-Tacks commented Aug 2, 2026

Copy link
Copy Markdown
Member

Would it make sense for squash merging to be the default in the future?

I personally think normal merges are easy to track and can preserve the details of PR authors, which can also help resolve conflicts in large PR

Merged via the queue into rust-lang:master with commit 5c67de2 Aug 2, 2026
18 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 2, 2026
@George-Ogden
George-Ogden deleted the linked-module-names branch August 2, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unlinked Files

4 participants