-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
mGCA: Make trait object types with type-level associated consts dyn compatible if all of the latter are specified via bindings #150843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. This PR modifies |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
mGCA: Make trait object types with type associated consts dyn compatible if the latter are specified via bindings
This comment has been minimized.
This comment has been minimized.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
mGCA: Make trait object types with type associated consts dyn compatible if the latter are specified via bindings
|
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
...but require all assoc consts to be specified via bindings.
We used to lower such bad defaulted const args in trait object types to
`{type error}`; now correctly lower them to `{const error}`.
The added tests used to ICE prior to this change.
…would otherwise ref `Self` The added test used to ICE prior to this change.
This fully rewords the diagnostic that was previously only emitted for assoc ty bindings. That's because it incorrectly called trait aliases *type aliases* and didn't really make it clear what the root cause is. The added test used to ICE prior to this change. I've double-checked that the preexisting test I've modified still ICEs in nightly-2025-03-29.
… `Self` (barring `Self` projections)
|
|
|
Small tweak post rebase. @bors r=BoxyUwU |
|
(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) |
This comment has been minimized.
This comment has been minimized.
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.
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
💔 Test for 22663dd failed: CI. Failed job:
|
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
Selfreferences 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-demanglehad 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.