Skip to content

Conversation

@fmease
Copy link
Member

@fmease fmease commented Jan 8, 2026

Under feature min_generic_const_args (mGCA) (#132980), render traits with non-parametrized type-level associated constants (i.e., #[type_const] ones) dyn compatible but force the user to specify all type-level associated consts in the trait object type via bindings (either directly, via supertrait bounds and/or behind trait aliases) just like associated types, their sibling.

Fixes #130300 (feature request).
Fixes #136063 (bug).
Fixes #137260 (bug).
Fixes #137514 (bug).

While I'm accounting for most illegal Self references via const projections & params, I'm intentionally ignoring RUST-123140 (and duplicates) in this PR which is to be tackled some other time.

Additional context: Crate rustc-demangle had to be updated to fix v0 demangling. I've patched it in PR rust-lang/rustc-demangle#87 which was was released in version 0.1.27 via PR rust-lang/rustc-demangle#88.

@fmease fmease added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. S-blocked Status: Blocked on something else such as an RFC or other implementation work. T-types Relevant to the types team, which will review and decide on the PR/issue. F-associated_const_equality `#![feature(associated_const_equality)]` labels Jan 8, 2026
@fmease fmease added the F-min_generic_const_args `#![feature(min_generic_const_args)]` label Jan 8, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 8, 2026

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

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.

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-tidy Area: The tidy tool S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jan 8, 2026
@fmease fmease moved this to In Progress in Associated Const Equality (ACE) Jan 8, 2026
@fmease

This comment was marked as outdated.

@rust-timer

This comment was marked as outdated.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Jan 8, 2026
mGCA: Make trait object types with type associated consts dyn compatible if the latter are specified via bindings
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 8, 2026
@rust-log-analyzer

This comment has been minimized.

@fmease

This comment was marked as outdated.

@rust-bors

This comment was marked as outdated.

@fmease

This comment was marked as outdated.

@rust-timer

This comment was marked as outdated.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Jan 8, 2026
mGCA: Make trait object types with type associated consts dyn compatible if the latter are specified via bindings
@rustbot
Copy link
Collaborator

rustbot commented Jan 8, 2026

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@rustbot rustbot added the T-clippy Relevant to the Clippy team. label Jan 8, 2026
@fmease fmease changed the title mGCA: Make trait object types with type associated consts dyn compatible if the latter are specified via bindings mGCA: Make trait object types with type-level associated consts dyn compatible if the latter are specified via bindings Jan 8, 2026
@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 Jan 21, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 21, 2026

⚠️ A new commit dd84861cd99cef7b78545402580534b96f0eb416 was pushed to the branch, the PR will need to be re-approved.

@fmease
Copy link
Member Author

fmease commented Jan 21, 2026

Small tweak post rebase.

@bors r=BoxyUwU

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 21, 2026

📌 Commit dd84861 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 21, 2026
@fmease
Copy link
Member Author

fmease commented Jan 21, 2026

Positioning myself above rollup of 2 that has a priority of 5 which I find a bit unreasonable: #151452.

@bors p=6

@JonathanBrouwer
Copy link
Contributor

(I think the norm is to make all rollups p=5, putting yourself above that is reasonable, I'll create the rollup if more rollup=always pop up)

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Jan 21, 2026
mGCA: Make trait object types with type-level associated consts dyn compatible if all of the latter are specified via bindings

Under feature `min_generic_const_args` (mGCA) (#132980), render traits with non-parametrized type-level associated constants (i.e., `#[type_const]` ones) dyn compatible but force the user to specify all type-level associated consts in the trait object type via bindings (either directly, via supertrait bounds and/or behind trait aliases) just like associated types, their sibling.

Fixes #130300 (feature request).
Fixes #136063 (bug).
Fixes #137260 (bug).
Fixes #137514 (bug).

While I'm accounting for most illegal `Self` references via const projections & params, I'm intentionally ignoring RUST-123140 (and duplicates) in this PR which is to be tackled some other time.

Additional context: Crate `rustc-demangle` had to be updated to fix v0 demangling. I've patched it in PR rust-lang/rustc-demangle#87 which was was released in version 0.1.27 via PR rust-lang/rustc-demangle#88.
@rust-log-analyzer

This comment has been minimized.

@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 Jan 21, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 21, 2026

💔 Test for 22663dd failed: CI. Failed job:

@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-review Status: Awaiting review from the assignee but also interested parties. labels Jan 21, 2026
@fmease
Copy link
Member Author

fmease commented Jan 21, 2026

@bors try jobs=aarch64-msvc-1

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Jan 21, 2026
mGCA: Make trait object types with type-level associated consts dyn compatible if all of the latter are specified via bindings


try-job: aarch64-msvc-1
@fmease fmease changed the title mGCA: Make trait object types with type-level associated consts dyn compatible if all of the latter are specified via bindings mGCA: Make trait object types with type-level associated consts dyn compatible Jan 21, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 21, 2026

☀️ Try build successful (CI)
Build commit: 06ef80b (06ef80b88ee75417e82ca7665be3db614f225321, parent: 625b63f9e148d511e187c71e5f70643ee62c77fb)

@fmease
Copy link
Member Author

fmease commented Jan 21, 2026

@bors r=BoxyUwU

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 21, 2026

📌 Commit 558a592 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 21, 2026
@fmease
Copy link
Member Author

fmease commented Jan 21, 2026

@bors p=0

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

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-tidy Area: The tidy tool F-associated_const_equality `#![feature(associated_const_equality)]` F-min_generic_const_args `#![feature(min_generic_const_args)]` rla-silenced Silences rust-log-analyzer postings to the PR it's added on. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-types Relevant to the types team, which will review and decide on the PR/issue.

Projects

6 participants