-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Implement --remap-path-prefix #48359
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @petrochenkov (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
409cd00
to
563ed18
Compare
src/librustc/session/config.rs
Outdated
.into_iter() | ||
.map(|remap| { | ||
let mut parts = remap.rsplitn(2, '='); | ||
match (parts.next(), parts.next()) { |
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.
The evaluation of components in tuple constructors is probably defined, but I still find this hard to read. And it's probably the wrong order because the iterator starts at the end :)
Could you rewrite this to something like:
let mut parts = ...;
let to = parts.next();
let from = parts.next();
match (from, to) { ... }
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.
Is there anything that implements FromIterator<Item=T>
for Option<(T,...)>
? I keep ending up in situations where it would be useful (mostly parsing with split), but I suspect it would clash with an existing FromIterator
for Option<T>
(unless specialization helps?).
Yes, documentation was my next question. |
563ed18
to
d0f8e29
Compare
65e2200
to
ed3e10d
Compare
Removed unstable book documentation and updated rustc.1 man page, which seems to be the only place I could find written documentation on command-line options. |
ed3e10d
to
b2f4104
Compare
b2f4104
to
ffd8ea7
Compare
Yes, for now that's true. We haven't created a space for |
📌 Commit ffd8ea7 has been approved by |
Ah, I just found a problem - it looks like having this option on the command line changes the crate hash. |
Rebasing to master seems to have fixed it, so maybe I just didn't have the other change before. |
Remove experimental -Zremap-path-prefix-from/to, and replace it with the stabilized --remap-path-prefix=from=to variant. This is an implementation for issue of rust-lang#41555.
ffd8ea7
to
56a6828
Compare
@bors r+ |
📌 Commit 56a6828 has been approved by |
Remove experimental -Zremap-path-prefix-from/to, and replace it with
the stabilized --remap-path-prefix=from=to variant.
Implementation for #41555