Skip to content

Use correct dir_path when parsing module from path - #162363

Open
mu001999 wants to merge 2 commits into
rust-lang:mainfrom
mu001999-contrib:fix-162080
Open

Use correct dir_path when parsing module from path#162363
mu001999 wants to merge 2 commits into
rust-lang:mainfrom
mu001999-contrib:fix-162080

Conversation

@mu001999

@mu001999 mu001999 commented Sep 6, 2026

Copy link
Copy Markdown
Member

Fixes #162080

We previously used the incorrect dir_path (which was name, the parent of name/mod.rs, in this case), and then joined it with name/mod.rs again, resulting in name/name/mod.rs.

The first commit adds the regression test and snapshot of current behavior, the second commit fixes it.

r? petrochenkov

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 6, 2026
@mu001999
mu001999 marked this pull request as ready for review September 6, 2026 12:07
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

False circular module error with #[path], inner attribute, and nested mod.rs

3 participants