Skip to content

Rollup of 4 pull requests#152373

Merged
rust-bors[bot] merged 9 commits intorust-lang:mainfrom
Zalathar:rollup-wDsfoHs
Feb 9, 2026
Merged

Rollup of 4 pull requests#152373
rust-bors[bot] merged 9 commits intorust-lang:mainfrom
Zalathar:rollup-wDsfoHs

Conversation

@Zalathar
Copy link
Member

@Zalathar Zalathar commented Feb 9, 2026

Successful merges:

Failed merges:

r? @ghost

Create a similar rollup

hanna-kruppe and others added 9 commits February 3, 2026 22:35
This is meant to be the interim successor to generic const expressions.
Essentially, const item RHS's will be allowed to do arbitrary const
operations using generics. The limitation is that these const items will
be treated opaquely, like ADTs in nominal typing, such that uses of them
will only be equal if the same const item is referenced. In other words,
two const items with the exact same RHS will not be considered equal.

I also added some logic to check feature gates that depend on others
being enabled (like oGCA depending on mGCA).

= Coherence =

During coherence, OGCA consts should be normalized ambiguously because
they are opaque but eventually resolved to a real value. We don't want
two OGCAs that have the same value to be treated as distinct for
coherence purposes. (Just like opaque types.)

This actually doesn't work yet because there are pre-existing
fundamental issues with equate relations involving consts that need to
be normalized. The problem is that we normalize only one layer of the
const item and don't actually process the resulting anon const. Normally
the created inference variable should be handled, which in this case
would cause us to hit the anon const, but that's not happening.
Specifically, `visit_const` on `Generalizer` should be updated to be
similar to `visit_ty`.
Implement MVP for opaque generic const arguments

This is meant to be the interim successor to generic const expressions.
Essentially, const item RHS's will be allowed to do arbitrary const
operations using generics. The limitation is that these const items will
be treated opaquely, like ADTs in nominal typing, such that uses of them
will only be equal if the same const item is referenced. In other words,
two const items with the exact same RHS will not be considered equal.

I also added some logic to check feature gates that depend on others
being enabled (like oGCA depending on mGCA).

### Coherence

During coherence, OGCA consts should be normalized ambiguously because
they are opaque but eventually resolved to a real value. We don't want
two OGCAs that have the same value to be treated as distinct for
coherence purposes. (Just like opaque types.)

This actually doesn't work yet because there are pre-existing
fundamental issues with equate relations involving consts that need to
be normalized. The problem is that we normalize only one layer of the
const item and don't actually process the resulting anon const. Normally
the created inference variable should be handled, which in this case
would cause us to hit the anon const, but that's not happening.
Specifically, `visit_const` on `Generalizer` should be updated to be
similar to `visit_ty`.

r? @BoxyUwU
…risDenton

Implement stdio FD constants

Tracking issue: rust-lang#150836
…erence, r=jonathanbrouwer

Port `rustc_strict_coherence` to the new attribute parser

r? @JonathanBrouwer
…ant-dtor, r=jonathanbrouwer

Port `rustc_insignificant_dtor`

r? @JonathanBrouwer

Second commit removes it from an impl in std. I looked, and I really think it had no effect in the past. We only look for this attr on ADTs...
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Feb 9, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) 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. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Feb 9, 2026
@Zalathar
Copy link
Member Author

Zalathar commented Feb 9, 2026

Rollup of everything.

@bors r+ rollup=never p=5

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 9, 2026

📌 Commit 7cb4501 has been approved by Zalathar

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 9, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 9, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 9, 2026

☀️ Test successful - CI
Approved by: Zalathar
Duration: 3h 27m 3s
Pushing 4cd4c18 to main...

@rust-bors rust-bors bot merged commit 4cd4c18 into rust-lang:main Feb 9, 2026
12 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 9, 2026
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#150823 Implement MVP for opaque generic const arguments 4c4aeb622e119e2c21e6478991fba18a7cfe16a9 (link)
#152071 Implement stdio FD constants 20cac3bcbe353b7bf7ca49e7d64a64e02c42df20 (link)
#152171 Port rustc_strict_coherence to the new attribute parser 0d9063cb6ffc54e5e98f87c95418485c043db910 (link)
#152291 Port rustc_insignificant_dtor 0e58b8ab8da9f6b53fc78401de4a2659e2405a57 (link)

previous master: 39219ceb97

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2026

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 39219ce (parent) -> 4cd4c18 (this PR)

Test differences

Show 88 test diffs

Stage 1

  • [ui] tests/ui/const-generics/ogca/basic-fail.rs: [missing] -> pass (J0)
  • [ui] tests/ui/const-generics/ogca/basic.rs: [missing] -> pass (J0)
  • [ui] tests/ui/const-generics/ogca/coherence-ambiguous.rs: [missing] -> pass (J0)
  • [ui] tests/ui/const-generics/ogca/rhs-but-not-root.rs: [missing] -> pass (J0)
  • [ui] tests/ui/feature-gates/feature-gate-opaque-generic-const-args.rs: [missing] -> pass (J0)

Stage 2

  • [ui] tests/ui/const-generics/ogca/basic-fail.rs: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/ogca/basic.rs: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/ogca/coherence-ambiguous.rs: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/ogca/rhs-but-not-root.rs: [missing] -> pass (J1)
  • [ui] tests/ui/feature-gates/feature-gate-opaque-generic-const-args.rs: [missing] -> pass (J1)

Additionally, 78 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 4cd4c18438fa57e005ee2bf9b80634f3a12d2998 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. aarch64-apple: 3h 7m -> 2h 15m (-27.6%)
  2. dist-aarch64-msvc: 1h 45m -> 1h 30m (-14.1%)
  3. aarch64-gnu: 2h 3m -> 2h 17m (+10.9%)
  4. pr-check-2: 39m 4s -> 42m 51s (+9.7%)
  5. x86_64-gnu-debug: 1h 53m -> 2h 4m (+9.6%)
  6. dist-aarch64-llvm-mingw: 1h 45m -> 1h 35m (-9.3%)
  7. dist-i586-gnu-i586-i686-musl: 1h 28m -> 1h 36m (+8.4%)
  8. dist-x86_64-apple: 1h 44m -> 1h 52m (+8.0%)
  9. x86_64-msvc-ext3: 1h 41m -> 1h 49m (+7.4%)
  10. x86_64-msvc-1: 2h 24m -> 2h 35m (+7.4%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (4cd4c18): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

Max RSS (memory usage)

Results (secondary -4.6%)

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

Cycles

Results (primary -1.6%)

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

Binary size

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

Bootstrap: 477.309s -> 473.075s (-0.89%)
Artifact size: 397.86 MiB -> 397.90 MiB (0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants