blob: b65f5345034e5f280afcb9d6c18dac5d4af3d378 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
trait Nat {
const VALUE: usize;
}
struct Zero;
impl Nat for Zero {
const VALUE: i32 = 0;
//~^ ERROR implemented const `VALUE` has an incompatible type for trait
}
fn main() {
let _: [i32; Zero::VALUE] = [];
}
|