a5b639dc01
Consider `tests/ui/const-generics/generic_const_exprs/issue-102768.stderr`, the error message where it gives additional notes about where the associated type is defined, and how the dead code lint doesn't have an article, like in `tests/ui/lint/dead-code/issue-85255.stderr`. They don't have articles, so it seems unnecessary to have one here.
20 lines
412 B
Rust
20 lines
412 B
Rust
trait Foo<const N: usize> {
|
|
fn do_x(&self) -> [u8; N];
|
|
}
|
|
|
|
struct Bar;
|
|
|
|
const T: usize = 42;
|
|
|
|
impl Foo<N = const 3> for Bar {
|
|
//~^ ERROR expected lifetime, type, or constant, found keyword `const`
|
|
//~| ERROR trait takes 1 generic
|
|
//~| ERROR associated type bindings are not allowed here
|
|
//~| ERROR associated const equality is incomplete
|
|
fn do_x(&self) -> [u8; 3] {
|
|
[0u8; 3]
|
|
}
|
|
}
|
|
|
|
fn main() {}
|