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 = 3> for Bar {
|
2023-02-23 11:27:06 -06:00
|
|
|
//~^ ERROR trait takes 1 generic argument but 0 generic arguments were supplied
|
2021-09-28 17:56:45 -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() {}
|