Use correct dir_path when parsing module from path - #162363
Merged
Merged
Conversation
mu001999
marked this pull request as ready for review
September 6, 2026 12:07
petrochenkov
reviewed
Sep 8, 2026
| @@ -0,0 +1,5 @@ | |||
| //@ ignore-auxiliary | |||
|
|
|||
| #![allow(unused)] | |||
Contributor
There was a problem hiding this comment.
Could you use some other attribute, or add a comment saying that this attribute is required?
Otherwise any cleanup like "remove unnecessary allows" will remove it accidentally.
Contributor
|
r=me with #162363 (comment) addressed. |
Member
Author
|
@bors r=petrochenkov rollup |
Contributor
mu001999
added a commit
to mu001999/rust
that referenced
this pull request
Sep 9, 2026
…rochenkov Use correct `dir_path` when parsing module from path Fixes rust-lang#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
rust-bors Bot
pushed a commit
that referenced
this pull request
Sep 9, 2026
Rollup of 6 pull requests Successful merges: - #162482 (Make `run-make` testsuite work with other codegen backend than LLVM) - #161587 (Avoid invalid suggestion in case of macro expansion without inferrable generic type) - #162363 (Use correct `dir_path` when parsing module from path) - #162408 (add crashtests [7/N]) - #162502 (triagebot: Subscribe me to amdgpu changes) - #162505 (Revert "fuchsia: Add safestack as a supported sanitizer for x86_64 fuchsia")
rust-bors Bot
pushed a commit
that referenced
this pull request
Sep 9, 2026
Rollup merge of #162363 - mu001999-contrib:fix-162080, r=petrochenkov Use correct `dir_path` when parsing module from path 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #162080
We previously used the incorrect
dir_path(which wasname, the parent ofname/mod.rs, in this case), and then joined it withname/mod.rsagain, resulting inname/name/mod.rs.The first commit adds the regression test and snapshot of current behavior, the second commit fixes it.
r? petrochenkov