2021-09-16 13:05:14 -07:00
|
|
|
trait Foo<const N: usize> {
|
|
|
|
fn do_x(&self) -> [u8; N];
|
|
|
|
}
|
|
|
|
|
|
|
|
struct Bar;
|
|
|
|
|
|
|
|
const T: usize = 42;
|
|
|
|
|
|
|
|
impl Foo<N = const 3> for Bar {
|
2021-09-28 10:57:34 -07:00
|
|
|
//~^ ERROR expected lifetime, type, or constant, found keyword `const`
|
2023-02-23 10:27:06 -07:00
|
|
|
//~| ERROR trait takes 1 generic
|
2021-09-28 10:57:34 -07:00
|
|
|
//~| ERROR associated type bindings are not allowed here
|
2022-01-13 07:39:58 +00:00
|
|
|
//~| ERROR associated const equality is incomplete
|
2021-09-16 13:05:14 -07:00
|
|
|
fn do_x(&self) -> [u8; 3] {
|
|
|
|
[0u8; 3]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|