-
Notifications
You must be signed in to change notification settings - Fork 932
Fix handling of modules in non_modrs_mods style #2675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Added a test; I couldn't fit it into the existing test patterns because if I put the files e.g. into |
I think that should work, maybe we need to update rustc_ap_syntax? |
Just did this, could you try a regular test now please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Code looks good, it would be nice to have a regular test, rather than a special case one, or at least properly understand why the regular test doesn't work.
We need to keep track of the module relative to which we're resolving paths, instead of always passing None. Fixes rust-lang#2673.
I rebased, but it still doesn't work. I get
when it tries to format I could make this a normal test if there were some way of telling the test runner not to format |
@flodiebold There is |
We need to skip children on foo.rs, since the parser will not find bar from that file, but with that, the test works fine.
@topecongiro Ah, of course, why didn't I think of that :) @nrc I've turned the test into an idempotence test now. |
Looks good, thanks! |
We need to keep track of the module relative to which we're resolving paths,
instead of always passing None.
Fixes #2673.
WIP because I still need to add a test; I'm making the PR already because I wanted to make sure this is the right approach.