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 = 3> for Bar {
|
2024-06-05 19:11:40 -04:00
|
|
|
//~^ ERROR associated item constraints 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() {}
|