blob: c781484d1e2e97b0520c3c9b66f688763cbf97a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// revisions:rpass1
struct FakeArray<T, const N: usize>(T);
impl<T, const N: usize> FakeArray<T, N> {
fn len(&self) -> usize {
N
}
}
fn main() {
let fa = FakeArray::<u32, { 32 }>(1);
assert_eq!(fa.len(), 32);
}
|