2021-09-16 15:05:14 -05: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 12:57:34 -05:00
|
|
|
//~^ ERROR expected lifetime, type, or constant, found keyword `const`
|
2023-02-23 11:27:06 -06:00
|
|
|
//~| ERROR trait takes 1 generic
|
2021-09-28 12:57:34 -05:00
|
|
|
//~| ERROR associated type bindings are not allowed here
|
2022-01-13 01:39:58 -06:00
|
|
|
//~| ERROR associated const equality is incomplete
|
2021-09-16 15:05:14 -05:00
|
|
|
fn do_x(&self) -> [u8; 3] {
|
|
|
|
[0u8; 3]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|