Skip to content

resolve: Cleanups and micro-optimizations to extern prelude #144746

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

Merged
merged 4 commits into from
Aug 4, 2025

Conversation

petrochenkov
Copy link
Contributor

This is what can be done without changing the structure of ExternPreludeEntry, like in #144737.

See individual commits for details.

@rustbot
Copy link
Collaborator

rustbot commented Jul 31, 2025

r? @davidtwco

rustbot has assigned @davidtwco.
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 Jul 31, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 31, 2025

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@petrochenkov
Copy link
Contributor Author

@bors2 try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Jul 31, 2025

⌛ Trying commit e58e6f8 with merge 29bbf36

To cancel the try build, run the command @bors try cancel.

rust-bors bot added a commit that referenced this pull request Jul 31, 2025
resolve: Cleanups and micro-optimizations to extern prelude
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 31, 2025
})
})
names.extend(self.r.extern_prelude.keys().flat_map(|ident| {
let res = Res::Def(DefKind::Mod, CRATE_DEF_ID.to_def_id());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Precise def id is not important here, there are a couple of other places in typo collection that do the same thing.

@rust-bors
Copy link

rust-bors bot commented Jul 31, 2025

☀️ Try build successful (CI)
Build commit: 29bbf36 (29bbf3649bebe2a2b151e692e80c7d64ea8e7f68, parent: 3fb1b53a9dbfcdf37a4b67d35cde373316829930)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (29bbf36): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary 2.3%, secondary 4.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.3% [2.3%, 2.3%] 1
Regressions ❌
(secondary)
4.0% [4.0%, 4.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.3% [2.3%, 2.3%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

Results (secondary 0.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.0% [0.0%, 0.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Bootstrap: 467.851s -> 468.994s (0.24%)
Artifact size: 376.84 MiB -> 376.80 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 31, 2025
@petrochenkov
Copy link
Contributor Author

No perf changes from removing double lookup is sort of good news, it means that re-introducing it when splitting extern prelude into two scopes (https://github.com/petrochenkov/rust/tree/extprel2, or https://github.com/petrochenkov/rust/tree/extprel3) will not regress it either.

@bors rollup=maybe

@b-naber
Copy link
Contributor

b-naber commented Aug 2, 2025

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 2, 2025

📌 Commit e58e6f8 has been approved by b-naber

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 Aug 2, 2025
bors added a commit that referenced this pull request Aug 4, 2025
Rollup of 12 pull requests

Successful merges:

 - #142205 (Mark `slice::swap_with_slice` unstably const)
 - #144188 (`available_parallelism`: Add documentation for why we don't look at `ulimit`)
 - #144322 (Add lint against dangling pointers from local variables)
 - #144497 (tests: Add test for basic line-by-line stepping in a debugger)
 - #144559 (Enable extract-insert-dyn.rs test on RISC-V (riscv64))
 - #144667 (`AlignmentEnum` should just be `repr(usize)` now)
 - #144706 (Do not give function allocations alignment in consteval and Miri.)
 - #144746 (resolve: Cleanups and micro-optimizations to extern prelude)
 - #144785 (Regression test for LLVM error with unsupported expression in static initializer for const pointer in array on macOS.)
 - #144811 (Stylize `*-lynxos178-*` target maintainer handle to make it easier to copy/paste)
 - #144848 (For "stage 1" ui-fulldeps, use the stage 1 compiler to query target info)
 - #144853 (Remove unnecessary `rust_` prefixes)

Failed merges:

 - #144794 (Port `#[coroutine]` to the new attribute system)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 2105044 into rust-lang:master Aug 4, 2025
11 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 4, 2025
rust-timer added a commit that referenced this pull request Aug 4, 2025
Rollup merge of #144746 - petrochenkov:extpreltidy, r=b-naber

resolve: Cleanups and micro-optimizations to extern prelude

This is what can be done without changing the structure of `ExternPreludeEntry`, like in #144737.

See individual commits for details.
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Aug 4, 2025
Rollup of 12 pull requests

Successful merges:

 - rust-lang/rust#142205 (Mark `slice::swap_with_slice` unstably const)
 - rust-lang/rust#144188 (`available_parallelism`: Add documentation for why we don't look at `ulimit`)
 - rust-lang/rust#144322 (Add lint against dangling pointers from local variables)
 - rust-lang/rust#144497 (tests: Add test for basic line-by-line stepping in a debugger)
 - rust-lang/rust#144559 (Enable extract-insert-dyn.rs test on RISC-V (riscv64))
 - rust-lang/rust#144667 (`AlignmentEnum` should just be `repr(usize)` now)
 - rust-lang/rust#144706 (Do not give function allocations alignment in consteval and Miri.)
 - rust-lang/rust#144746 (resolve: Cleanups and micro-optimizations to extern prelude)
 - rust-lang/rust#144785 (Regression test for LLVM error with unsupported expression in static initializer for const pointer in array on macOS.)
 - rust-lang/rust#144811 (Stylize `*-lynxos178-*` target maintainer handle to make it easier to copy/paste)
 - rust-lang/rust#144848 (For "stage 1" ui-fulldeps, use the stage 1 compiler to query target info)
 - rust-lang/rust#144853 (Remove unnecessary `rust_` prefixes)

Failed merges:

 - rust-lang/rust#144794 (Port `#[coroutine]` to the new attribute system)

r? `@ghost`
`@rustbot` modify labels: rollup
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.

6 participants