Skip to content

Stop using rustc_layout_scalar_valid_range_* in rustc#152569

Open
oli-obk wants to merge 1 commit intorust-lang:mainfrom
oli-obk:rustc_layout_scalar_valid_range_end_end
Open

Stop using rustc_layout_scalar_valid_range_* in rustc#152569
oli-obk wants to merge 1 commit intorust-lang:mainfrom
oli-obk:rustc_layout_scalar_valid_range_end_end

Conversation

@oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Feb 13, 2026

View all comments

Another step towards #135996

Required some manual impls, but we already do many manual impls for the newtype_index types, so it's not really a new maintenance burden.

@rustbot
Copy link
Collaborator

rustbot commented Feb 13, 2026

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Some changes occurred in coverage instrumentation.

cc @Zalathar

@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 Feb 13, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 13, 2026

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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 68 candidates
  • Random selection from 18 candidates

@rust-log-analyzer

This comment has been minimized.

Copy link
Member

@davidtwco davidtwco left a comment

Choose a reason for hiding this comment

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

LGTM with CI failures fixed

View changes since this review

@oli-obk oli-obk force-pushed the rustc_layout_scalar_valid_range_end_end branch from b7ee60f to 01df8d6 Compare February 16, 2026 15:19
@rustbot

This comment has been minimized.

@oli-obk
Copy link
Contributor Author

oli-obk commented Feb 16, 2026

@bors r=davidtwco

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 16, 2026

📌 Commit 01df8d6 has been approved by davidtwco

It is now in the queue for this repository.

@rust-bors rust-bors bot 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 Feb 16, 2026
@oli-obk
Copy link
Contributor Author

oli-obk commented Feb 16, 2026

oh wait

@bors r-

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors rust-bors bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 16, 2026
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Feb 16, 2026
@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Feb 16, 2026
…nd, r=<try>

Stop using rustc_layout_scalar_valid_range_* in rustc
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 16, 2026

☀️ Try build successful (CI)
Build commit: e8d615a (e8d615a27a9044825333881a720535b5c42eb976, parent: 71e00273c0921e1bc850ae8cc4161fbb44cfa848)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (e8d615a): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

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.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

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

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.2% [0.2%, 0.2%] 2
Regressions ❌
(secondary)
0.4% [0.3%, 0.5%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.2% [-0.3%, -0.1%] 5
All ❌✅ (primary) 0.2% [0.2%, 0.2%] 2

Max RSS (memory usage)

Results (primary 2.7%, secondary -3.5%)

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

mean range count
Regressions ❌
(primary)
2.7% [2.7%, 2.7%] 1
Regressions ❌
(secondary)
4.9% [4.9%, 4.9%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-6.2% [-6.9%, -5.4%] 3
All ❌✅ (primary) 2.7% [2.7%, 2.7%] 1

Cycles

Results (secondary -2.3%)

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
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.3% [-2.3%, -2.3%] 1
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 485.967s -> 484.264s (-0.35%)
Artifact size: 397.80 MiB -> 397.80 MiB (0.00%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Feb 16, 2026
@oli-obk
Copy link
Contributor Author

oli-obk commented Feb 17, 2026

@bors r=davidtwco

The detailed view of the instruction count regression shows measures time improvements. Those look random, too, so I'm guessing it's just noise

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 17, 2026

📌 Commit 01df8d6 has been approved by davidtwco

It is now in the queue for this repository.

@rust-bors rust-bors bot 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 17, 2026
@jhpratt
Copy link
Member

jhpratt commented Feb 18, 2026

Given the large number of rollup=never PRs in the queue and the apparent noise here,

@bors rollup=iffy

JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 18, 2026
…range_end_end, r=davidtwco

Stop using rustc_layout_scalar_valid_range_* in rustc

Another step towards rust-lang#135996

Required some manual impls, but we already do many manual impls for the newtype_index types, so it's not really a new maintenance burden.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 18, 2026
…range_end_end, r=davidtwco

Stop using rustc_layout_scalar_valid_range_* in rustc

Another step towards rust-lang#135996

Required some manual impls, but we already do many manual impls for the newtype_index types, so it's not really a new maintenance burden.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 18, 2026
…range_end_end, r=davidtwco

Stop using rustc_layout_scalar_valid_range_* in rustc

Another step towards rust-lang#135996

Required some manual impls, but we already do many manual impls for the newtype_index types, so it's not really a new maintenance burden.
rust-bors bot pushed a commit that referenced this pull request Feb 18, 2026
…uwer

Rollup of 18 pull requests

Successful merges:

 - #152799 (Subtree sync for rustc_codegen_cranelift)
 - #152569 (Stop using rustc_layout_scalar_valid_range_* in rustc)
 - #151059 (x86: support passing `u128`/`i128` to inline assembly)
 - #152097 (Suggest local variables for captured format args)
 - #152734 (Respect the `--ci` flag in more places in bootstrap)
 - #151703 (Fix ICE in transmutability error reporting when type aliases are normalized)
 - #152173 (Reflection TypeKind::FnPtr)
 - #152564 (Remove unnecessary closure.)
 - #152628 (tests: rustc_public: Check const allocation for all variables (1 of 11 was missing))
 - #152658 (compiletest: normalize stderr before SVG rendering)
 - #152766 (std::r#try! - avoid link to nightly docs)
 - #152780 (Remove some clones in deriving)
 - #152787 (Add a mir-opt test for alignment check generation [zero changes outside tests])
 - #152790 (Fix incorrect target in aarch64-unknown-linux-gnu docs)
 - #152792 (Fix an ICE while checking param env shadowing on an erroneous trait impl)
 - #152793 (Do no add -no-pie on Windows)
 - #152803 (Avoid delayed-bug ICE for malformed diagnostic attrs)
 - #152806 (interpret: fix comment typo)
@JonathanBrouwer
Copy link
Contributor

@bors try jobs=dist-x86_64-linux-alt

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Feb 18, 2026
…nd, r=<try>

Stop using rustc_layout_scalar_valid_range_* in rustc


try-job: dist-x86_64-linux-alt
@rust-bors rust-bors bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Feb 18, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 18, 2026

💔 Test for 0825e37 failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

@JonathanBrouwer
Copy link
Contributor

@bors r-

@rust-bors rust-bors bot removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Feb 18, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 18, 2026

Commit e62bc63 has been unapproved.

This PR was contained in a rollup (#152810), which was also unapproved.

@oli-obk
Copy link
Contributor Author

oli-obk commented Feb 20, 2026

oh no 🙈 I think I need to wait for a bootstrap bump before I can use it in rustc

@rust-bors

This comment has been minimized.

@oli-obk oli-obk force-pushed the rustc_layout_scalar_valid_range_end_end branch from e62bc63 to ff7e604 Compare March 7, 2026 15:44
@rustbot
Copy link
Collaborator

rustbot commented Mar 7, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@oli-obk
Copy link
Contributor Author

oli-obk commented Mar 11, 2026

@bors r=davidtwco

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 11, 2026

📌 Commit ff7e604 has been approved by davidtwco

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 1000. This pull request will be tested once the tree is reopened.

@rust-bors rust-bors bot 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 11, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 11, 2026
…range_end_end, r=davidtwco

Stop using rustc_layout_scalar_valid_range_* in rustc

*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/152569)*

Another step towards rust-lang#135996

Required some manual impls, but we already do many manual impls for the newtype_index types, so it's not really a new maintenance burden.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 11, 2026
…range_end_end, r=davidtwco

Stop using rustc_layout_scalar_valid_range_* in rustc

*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/152569)*

Another step towards rust-lang#135996

Required some manual impls, but we already do many manual impls for the newtype_index types, so it's not really a new maintenance burden.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf-regression Performance regression. 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.

8 participants