Skip to content

yeet type const - #162517

Merged
rust-bors[bot] merged 5 commits into
rust-lang:mainfrom
khyperia:yeet-type-const
Sep 12, 2026
Merged

yeet type const#162517
rust-bors[bot] merged 5 commits into
rust-lang:mainfrom
khyperia:yeet-type-const

Conversation

@khyperia

@khyperia khyperia commented Sep 9, 2026

Copy link
Copy Markdown
Member

View all comments

tracking issue: #132980

zulip thread context (design decussion of future of gca): #project-const-generics > talkies at last @ 💬

this PR does two things:

it also migrates the test suite to the syntax introduced in #162179 i.e. the new way to write type const is now const ITEM: T = core::direct_const_arg!(V); (ouch my hands, that took a while)

r? @BoxyUwU

@rustbot

rustbot commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

This PR changes rustc_public

cc @oli-obk, @celinval, @ouz-a, @makai410

Some changes occurred in match checking

cc @Nadrieril

The parser was modified, potentially altering the grammar of (stable) Rust
which would be a breaking change.

cc @fmease

HIR ty lowering was modified

cc @fmease

Some changes occurred in compiler/rustc_attr_ir

cc @jdonszelmann, @JonathanBrouwer

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

rustfmt is developed in its own repository. If possible, consider making this change to rust-lang/rustfmt instead.

cc @rust-lang/rustfmt

clippy is developed in its own repository. If possible, consider making this change to rust-lang/rust-clippy instead.

cc @rust-lang/clippy

Some changes occurred in compiler/rustc_passes/src/check_attr.rs

cc @jdonszelmann, @JonathanBrouwer

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann, @JonathanBrouwer

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 A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. labels Sep 9, 2026
@rustbot

rustbot commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

BoxyUwU is currently at their maximum review capacity.
They may take a while to respond.

Comment thread compiler/rustc_attr_parsing/src/attributes/semantics.rs Outdated
Comment thread compiler/rustc_ast_passes/src/feature_gate.rs
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot

rustbot commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

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.

@BoxyUwU BoxyUwU left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

r=me once CI is green

@bors rollup=never p=1

View changes since this review

@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 11, 2026
@BoxyUwU

BoxyUwU commented Sep 12, 2026

Copy link
Copy Markdown
Member

@bors r+ rollup=never

@rust-bors

rust-bors Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

📌 Commit f5eb9e4 has been approved by BoxyUwU

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 Sep 12, 2026
@BoxyUwU

BoxyUwU commented Sep 12, 2026

Copy link
Copy Markdown
Member

@bors p=1

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 12, 2026
yeet `type const`



tracking issue: #132980

zulip thread context (design decussion of future of gca): [#project-const-generics > talkies at last @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/260443-project-const-generics/topic/talkies.20at.20last/near/620368825)

this PR does two things:

- implement `#[rustc_always_gca]` (bikeshed name thread: [#project-const-generics > #[always_gca] bikeshed](https://rust-lang.zulipchat.com/#narrow/channel/260443-project-const-generics/topic/.23.5Balways_gca.5D.20bikeshed/with/622249110) )
- remove `type const` syntax

it also migrates the test suite to the syntax introduced in #162179 i.e. the new way to write `type const` is now `const ITEM: T = core::direct_const_arg!(V);` (ouch my hands, that took a while)

r? @BoxyUwU
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-i686-msvc failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@rust-bors rust-bors Bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 12, 2026
@rust-bors

rust-bors Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

💔 Test for e36ddcd failed: CI. Failed job:

@JonathanBrouwer

Copy link
Copy Markdown
Member

@bors retry

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

rust-bors Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: BoxyUwU
Duration: 3h 6m 5s
Pushing 9c99d05 to main...

@github-actions

Copy link
Copy Markdown
Contributor
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 74b3f08 (parent) -> 9c99d05 (this PR)

Test differences

Show 111 test diffs

Stage 1

  • [ui (polonius)] tests/ui/const-generics/mgca/free-const-recursive.rs: pass -> [missing] (J1)
  • [ui (polonius)] tests/ui/const-generics/mgca/free-const-recursive.rs#gca: [missing] -> pass (J1)
  • [ui (polonius)] tests/ui/const-generics/mgca/free-const-recursive.rs#min_gca: [missing] -> pass (J1)
  • [ui (polonius)] tests/ui/const-generics/mgca/suggest-direct-const.rs: [missing] -> pass (J1)
  • [ui (polonius)] tests/ui/const-generics/mgca/suggest-pub-type_const.rs: pass -> [missing] (J1)
  • [ui] tests/ui/const-generics/mgca/free-const-recursive.rs: pass -> [missing] (J2)
  • [ui] tests/ui/const-generics/mgca/free-const-recursive.rs#gca: [missing] -> pass (J2)
  • [ui] tests/ui/const-generics/mgca/free-const-recursive.rs#min_gca: [missing] -> pass (J2)
  • [ui] tests/ui/const-generics/mgca/suggest-direct-const.rs: [missing] -> pass (J2)
  • [ui] tests/ui/const-generics/mgca/suggest-pub-type_const.rs: pass -> [missing] (J2)

Stage 2

  • [ui] tests/ui/const-generics/mgca/free-const-recursive.rs: pass -> [missing] (J0)
  • [ui] tests/ui/const-generics/mgca/free-const-recursive.rs#gca: [missing] -> pass (J0)
  • [ui] tests/ui/const-generics/mgca/free-const-recursive.rs#min_gca: [missing] -> pass (J0)
  • [ui] tests/ui/const-generics/mgca/suggest-direct-const.rs: [missing] -> pass (J0)
  • [ui] tests/ui/const-generics/mgca/suggest-pub-type_const.rs: pass -> [missing] (J0)

Additionally, 96 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 9c99d05505bccb67912d68e05fe7fc7c58afcb41 --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. dist-armv7-linux: 1h 8m -> 1h 39m (+45.9%)
  2. test-i686-gnu-1: 2h 14m -> 1h 16m (-42.9%)
  3. test-x86_64-gnu-stdlib-semver-check: 17m 15s -> 9m 57s (-42.3%)
  4. test-x86_64-msvc-ext2: 1h 13m -> 1h 40m (+37.2%)
  5. test-x86_64-gnu-tools: 1h 10m -> 48m 38s (-31.2%)
  6. dist-x86_64-illumos: 1h 47m -> 1h 14m (-30.7%)
  7. test-x86_64-gnu-stable: 2h 39m -> 1h 50m (-30.4%)
  8. test-i686-gnu-nopt-2: 1h 47m -> 2h 20m (+30.3%)
  9. dist-x86_64-netbsd: 1h 14m -> 1h 36m (+29.7%)
  10. optional-test-x86_64-gnu-autodiff: 55m 8s -> 39m 23s (-28.6%)
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.

@khyperia
khyperia deleted the yeet-type-const branch September 12, 2026 10:28
@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (9c99d05): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

Results (primary -1.1%, secondary -2.2%)

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)
2.1% [2.1%, 2.1%] 1
Improvements ✅
(primary)
-1.1% [-2.1%, -0.4%] 9
Improvements ✅
(secondary)
-2.9% [-4.5%, -1.1%] 6
All ❌✅ (primary) -1.1% [-2.1%, -0.4%] 9

Cycles

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)
1.0% [0.4%, 3.1%] 8
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.6% [-0.9%, -0.4%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.5% [-0.9%, 3.1%] 12

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 493.042s -> 497.802s (0.97%)
Artifact size: 406.92 MiB -> 406.93 MiB (0.00%)

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. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. T-rustfmt Relevant to the rustfmt 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