-
Notifications
You must be signed in to change notification settings - Fork 13.5k
rustc_session: Add a structure for keeping both explicit and default sysroots #142799
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
base: master
Are you sure you want to change the base?
Conversation
…sysroots Also avoid creating and cloning sysroot unnecessarily.
cc @davidtwco, @compiler-errors, @TaKO8Ki Some changes occurred in compiler/rustc_codegen_ssa These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
} | ||
|
||
/// Returns both explicit sysroot if it was passed with `--sysroot` and the default sysroot. | ||
pub fn all_paths(&self) -> impl Iterator<Item = &Path> { |
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.
Maybe return &[PathBuf]
instead? Then fluent_bundle
won't need to be made generic.
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.
How? Can't do that without changing the storage in Sysroot
to something like SmallVec<[PathBuf; 2]>
.
fluent_bundle
could also be made non-generic by collecting the iterator at its call site.
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.
Right
I've been meaning to split r=me with the |
Also avoid creating and cloning sysroot unnecessarily.
Implements the suggestion from #142089 (comment).
r? @bjorn3