-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Fix mod from inline mod in non-mod-rs. #55108
Conversation
This works under the assumption that filesystem paths should match mod paths. When a mod is loaded from within an inline mod, it was using the wrong path when inside a non-mod-rs file. It was not including the path components from the non-mod-rs file. This change also includes: - Added a test to the run-pass test. - Added a test to verify the error message when missing. - Remove unused `non_modrs_mods` for feature gate diagnostics. - Fixes the run-pass test, it was accidentally removed during stabilization. - Remove the vestiges of the feature gate tests in `test/ui`. - Enable the diagnostic test on windows, there didn't seem to be a reason to disable it.
r? @pnkfelix (rust_highfive has picked a reviewer for you, use r? to override) |
There is a second commit that fixes it for |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Well bummer. Apparently non-mod-rs behavior was always possible with So, stable rust supported this:
Notice the distinct lack of I can't think of a way, yet, to continue to support this while fixing the original issue. It's getting late here, so I'll need to pick it up tomorrow. |
I've been trying to think of a solution to the above, but I'm running out of ideas. Some (bad) ideas:
And just to be clear, I would propose leaving original Let me know if anyone has any ideas. |
sorry for not getting around to revewing this yet |
Yea, that's fine. However, some of the fixes here should not get lost. |
This works under the assumption that filesystem paths should match mod paths.
When a mod is loaded from within an inline mod, it was using the wrong path when
inside a non-mod-rs file. It was not including the path components from the
non-mod-rs file.
This change also includes:
non_modrs_mods
for feature gate diagnostics.test/ui
.disable it.
Fixes #55094