Skip to content

Conversation

@saethlin
Copy link
Member

The previous implementation only accepted trivial consts that assign a literal. For example:

const A: usize = 0;
const B: usize = A;

Before this PR, only A was a trivial const. Now B is too.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 27, 2025
@saethlin
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 27, 2025
Accept trivial consts based on trivial consts
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 27, 2025
@rust-bors

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Oct 27, 2025

☀️ Try build successful (CI)
Build commit: 2f43088 (2f430888c54e6073a1742439ac5020b07745922b, parent: 9ea8d67cc60e88ad6fffbf299a454c44227e001c)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (2f43088): 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
Regressions ❌
(secondary)
0.4% [0.1%, 0.9%] 3
Improvements ✅
(primary)
-0.7% [-1.1%, -0.2%] 13
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.7% [-1.1%, -0.2%] 13

Max RSS (memory usage)

Results (primary 0.5%)

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

mean range count
Regressions ❌
(primary)
2.0% [0.6%, 3.3%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.4% [-2.4%, -2.4%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.5% [-2.4%, 3.3%] 3

Cycles

Results (primary -4.4%, secondary -2.1%)

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)
1.6% [1.6%, 1.6%] 1
Improvements ✅
(primary)
-4.4% [-5.1%, -3.6%] 2
Improvements ✅
(secondary)
-5.8% [-5.8%, -5.8%] 1
All ❌✅ (primary) -4.4% [-5.1%, -3.6%] 2

Binary size

Results (primary -0.3%, secondary -0.1%)

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

mean range count
Regressions ❌
(primary)
0.0% [0.0%, 0.0%] 2
Regressions ❌
(secondary)
0.0% [0.0%, 0.0%] 2
Improvements ✅
(primary)
-0.4% [-0.6%, -0.0%] 16
Improvements ✅
(secondary)
-0.1% [-0.2%, -0.0%] 2
All ❌✅ (primary) -0.3% [-0.6%, 0.0%] 18

Bootstrap: 474.628s -> 474.127s (-0.11%)
Artifact size: 390.61 MiB -> 390.58 MiB (-0.01%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Oct 27, 2025
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-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

3 participants