-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-const_trait_impl`#![feature(const_trait_impl)]``#![feature(const_trait_impl)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
I'm not sure what the correct behavior is here, but the current behavior definitely seems weird.
#![feature(const_trait_impl)]
const trait Super {}
trait Sub: const Super {
fn method(&self);
}
fn wut(x: &dyn Sub) {
x.method();
}
error[E0277]: the trait bound `dyn Sub: const Super` is not satisfied
--> src/lib.rs:9:7
|
9 | x.method();
| ^^^^^^
|
note: required by a bound in `Sub::method`
--> src/lib.rs:4:12
|
4 | trait Sub: const Super {
| ^^^^^^^^^^^ required by this bound in `Sub::method`
5 | fn method(&self);
| ------ required by a bound in this associated function
For more information about this error, try `rustc --explain E0277`.
@rustbot labels +F-const_trait_impl
Meta
Reproducible on the playground with version 1.91.0-nightly (2025-08-09 ca77504943887037504c)
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-const_trait_impl`#![feature(const_trait_impl)]``#![feature(const_trait_impl)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.