-
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
Crate loader cleanups #126099
Crate loader cleanups #126099
Conversation
Simplify the path operation with `join`, clarify some of the names.
These commits modify compiler targets. |
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 cleanup!
let (hash, kind) = if let Some(f) = f.strip_prefix(rlib_prefix) | ||
&& let Some(f) = f.strip_suffix(rlib_suffix) | ||
{ |
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 much easier to understand 👍
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.
i really love rusts string manipulation methods
} else { | ||
sess.target_filesearch(path_kind) | ||
}, | ||
target: &sess.target, |
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.
I'm so confused. The callsite is always false
and there was a casual is_host
branch here? Archaeology didn't reveal much for why this came to be, oh well.
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.
But apparently this seems to work since 5 years ago when is_host
was introduced, then I guess it must've worked because nobody complained about 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.
Only true
usage in https://github.com/rust-lang/rust/pull/66496/files
/// Look for a plugin registrar. Returns its library path and crate disambiguator.
pub fn find_plugin_registrar(
so I think this is correct since we ripped out compiler plugin support some time ago.
since I'm going to sleep and won't be here for CI to complete, I'll optimistically |
jokes on me i didn't go to sleep and got to witness green CI, fuck |
…=jieyouxu Crate loader cleanups Minor cleanups I found while trying to understand how all of this works
…kingjubilee Rollup of 8 pull requests Successful merges: - rust-lang#125606 (Size optimize int formatting) - rust-lang#125724 (Uplift `Relate`/`TypeRelation` into `rustc_next_trait_solver`) - rust-lang#126040 (Don't warn on fields in the `unreachable_pub` lint ) - rust-lang#126065 (mark binding undetermined if target name exist and not obtained) - rust-lang#126098 (Remove `same-lib-two-locations-no-panic` run-make test) - rust-lang#126099 (Crate loader cleanups) - rust-lang#126101 (Revert "Disallow ambiguous attributes on expressions" on nightly) - rust-lang#126103 (Improve Docs for `hir::Impl` and `hir::ImplItem`) r? `@ghost` `@rustbot` modify labels: rollup
…kingjubilee Rollup of 7 pull requests Successful merges: - rust-lang#125606 (Size optimize int formatting) - rust-lang#125724 (Uplift `Relate`/`TypeRelation` into `rustc_next_trait_solver`) - rust-lang#126040 (Don't warn on fields in the `unreachable_pub` lint ) - rust-lang#126098 (Remove `same-lib-two-locations-no-panic` run-make test) - rust-lang#126099 (Crate loader cleanups) - rust-lang#126101 (Revert "Disallow ambiguous attributes on expressions" on nightly) - rust-lang#126103 (Improve Docs for `hir::Impl` and `hir::ImplItem`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#126099 - Nilstrieb:crate-loader-cleanups, r=jieyouxu Crate loader cleanups Minor cleanups I found while trying to understand how all of this works
Minor cleanups I found while trying to understand how all of this works