Closed
Description
trait Trait {
const N: usize;
}
impl Trait for i32 {}
fn f()
where
[(); <i32 as Trait>::N]:,
{}
fn main() {}
results in
error[[E0080]](https://doc.rust-lang.org/nightly/error-index.html#E0080): evaluation of constant value failed
--> src/main.rs:9:10
|
9 | [(); <i32 as Trait>::N]:,
| ^^^^^^^^^^^^^^^^^ referenced constant has errors
without showing that N
is missing in the trait impl.
Taken from the comment by @carado in #74713 (comment)