Skip to content

Conversation

@oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Nov 27, 2025

Some smaller diagnostic changes, the biggest ones avoided by #148641

We should be able to move various checks in mir const checking to using span_bug! instead of reporting an error, just like mir typeck does as a sanity check. I would like to start doing so separately though, as this PR is a big enough (in what effects it causes, pun intended).

r? @fee1-dead

@rustbot
Copy link
Collaborator

rustbot commented Nov 27, 2025

This PR modifies tests/ui/issues/. If this PR is adding new tests to tests/ui/issues/,
please refrain from doing so, and instead add it to more descriptive subdirectories.

This PR changes a file inside tests/crashes. If a crash was fixed, please move into the corresponding ui subdir and add 'Fixes #' to the PR description to autoclose the issue upon merge.

@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 Nov 27, 2025
@oli-obk
Copy link
Contributor Author

oli-obk commented Nov 27, 2025

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Nov 27, 2025
Perform many const checks in typeck
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 27, 2025
Comment on lines 1 to +13
//@ known-bug: #137187
#![feature(const_trait_impl, const_ops)]

use std::ops::Add;
trait A where
*const Self: Add,
const trait A where
*const Self: const Add,
{
const fn b(c: *const Self) -> <*const Self as Add>::Output {
fn b(c: *const Self) -> <*const Self as Add>::Output {
c + c
}
}

fn main() {}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This produces the same ICE as before, but the changes were required to pass typeck so we'd actually get to mir const checks

@rust-bors
Copy link

rust-bors bot commented Nov 27, 2025

☀️ Try build successful (CI)
Build commit: 1a2d233 (1a2d2335c5ae8430107aa12ba73195c9b8aca1f0, parent: a4175159da185130408f71d7aa7e9bff0d455c24)

@rust-timer

This comment has been minimized.

@fmease fmease added the PG-const-traits Project group: Const traits label Nov 27, 2025
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (1a2d233): comparison URL.

Overall result: ❌ regressions - 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.1% [0.1%, 0.2%] 12
Regressions ❌
(secondary)
0.2% [0.0%, 0.3%] 10
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [0.1%, 0.2%] 12

Max RSS (memory usage)

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

Cycles

Results (primary -2.7%)

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

Binary size

Results (primary 0.1%, 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.1% [0.1%, 0.1%] 4
Regressions ❌
(secondary)
0.1% [0.1%, 0.1%] 34
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [0.1%, 0.1%] 4

Bootstrap: 472.621s -> 472.008s (-0.13%)
Artifact size: 386.88 MiB -> 386.98 MiB (0.03%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Nov 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. PG-const-traits Project group: Const traits 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants