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).

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

Blockers

  1. Merge RUST-150844 (split out of this PR)
  2. This PR basically sits atop PR RUST-150799 (but squashed)
    • I "need" some of the fixes it contains for a single test.
    • I'm going to drop that commit once the linked PR gets merged.
  3. Crate rustc-demangle needs to be updated first, mainly for v0 mangling
  4. Apart from v0 mangling, legacy mangling (no longer the default) ICEs on such dyn traits
    • we might want to address that
  5. Perf test
  6. Need to audit HIR ty lowering (see FIXMEs)
    • I'm certain there are still cases of Self references I need to forbid
    • (I'm intentionally excluding RUST-123140 here which is to be tackled some other time)
  7. There are some minor diagnostic tweaks I'd still like to perform (see FIXMEs)

@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-timer

This comment was marked as outdated.

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

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment was marked as outdated.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@fmease fmease added the rla-silenced Silences rust-log-analyzer postings to the PR it's added on. label Jan 9, 2026
@fmease
Copy link
Member Author

fmease commented Jan 10, 2026

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

This pull request is already queued and waiting for a try build to finish.

@rust-bors

This comment has been minimized.

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

rust-bors bot commented Jan 10, 2026

☀️ Try build successful (CI)
Build commit: e81452f (e81452fec4e0e95e06a3bb9353fe1b32508854f2, parent: 1191620b8c4a93074796408afa538e086acf38c7)

@rust-timer
Copy link
Collaborator

Queued e81452f with parent 1191620, future comparison URL.
There is currently 1 preceding artifact in the queue.
It will probably take at least ~1.7 hours until the benchmark run finishes.

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-blocked Status: Blocked on something else such as an RFC or other implementation work. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. S-waiting-on-perf Status: Waiting on a perf run to be completed. 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