Skip to content
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

Merged
merged 3 commits into from
Jun 7, 2024
Merged

Crate loader cleanups #126099

merged 3 commits into from
Jun 7, 2024

Conversation

Noratrieb
Copy link
Member

Minor cleanups I found while trying to understand how all of this works

@rustbot
Copy link
Collaborator

rustbot commented Jun 6, 2024

r? @BoxyUwU

rustbot has assigned @BoxyUwU.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 6, 2024
@rustbot
Copy link
Collaborator

rustbot commented Jun 6, 2024

These commits modify compiler targets.
(See the Target Tier Policy.)

Copy link
Member

@jieyouxu jieyouxu left a 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!

Comment on lines +417 to +419
let (hash, kind) = if let Some(f) = f.strip_prefix(rlib_prefix)
&& let Some(f) = f.strip_suffix(rlib_suffix)
{
Copy link
Member

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 👍

Copy link
Member Author

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,
Copy link
Member

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.

Copy link
Member

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 🤷

Copy link
Member

@jieyouxu jieyouxu Jun 6, 2024

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.

@Noratrieb
Copy link
Member Author

since I'm going to sleep and won't be here for CI to complete, I'll optimistically
@bors r=jieyouxu

@bors
Copy link
Contributor

bors commented Jun 6, 2024

📌 Commit b4c439c has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 6, 2024
@Noratrieb
Copy link
Member Author

jokes on me i didn't go to sleep and got to witness green CI, fuck

@BoxyUwU BoxyUwU assigned jieyouxu and unassigned BoxyUwU Jun 6, 2024
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Jun 7, 2024
…=jieyouxu

Crate loader cleanups

Minor cleanups I found while trying to understand how all of this works
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 7, 2024
…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
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 7, 2024
…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
@bors bors merged commit 4c771d3 into rust-lang:master Jun 7, 2024
6 checks passed
@rustbot rustbot added this to the 1.80.0 milestone Jun 7, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jun 7, 2024
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
@Noratrieb Noratrieb deleted the crate-loader-cleanups branch June 7, 2024 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants