-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
expand: Refactor module loading #82415
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
bc18eb4
expand: Remove obsolete `DirectoryOwnership::UnownedViaMod`
petrochenkov 39052c5
expand: Move module file path stack from global session to expansion …
petrochenkov 5bdf81d
expand: Determine module directory path directly instead of relying o…
petrochenkov 3d0b622
expand: Less path cloning during module loading
petrochenkov 46b67aa
expand: Some more consistent naming in module loading
petrochenkov da3419e
rustc_interface: Hide some hacky details of early linting from expand
petrochenkov 29a9ef2
expand: Align some code with the PR fixing inner attributes on out-of…
petrochenkov 1e1d574
expand: Share some code between inline and out-of-line module treatment
petrochenkov 1fe2eb8
expand: Introduce enum for module loading errors and make module load…
petrochenkov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
This feature is currently not used anywhere inside the compiler. Given that you are only using it at one single place in rustc_expand and that avoiding it would the life of for example mrustc easier at the expense of writing just a tiny bit less nice code, I would err towards not using it.
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.
To be clear if using it had a bigger benefit for rustc itself, I would be fine with using it. It is just that I don't think the benefit for rustc outweighs the cost for mrustc in this particular case.
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.
This is more or less rust-lang/compiler-team#358 again.
I want to use compiler for dogfooding recently implemented unstable features, without looking at what third-party projects may think about it.
Destructuring assignment is a convenient feature, if it's removed from this PR then it may be useful in a next PR.
Similarly, #82641 starts using
#![feature(extended_key_value_attributes)]
, should it abandon it too?At which point are we allowed to use these features? I don't want mrustc to decide that.
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.
Note that
#![feature(extended_key_value_attributes)]
will probably be stabilized soon anyway.