rust/tests/incremental/const-generics/issue-61516.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
239 B
Rust
Raw Normal View History

//@ revisions:rpass1
struct FakeArray<T, const N: usize>(T);
2020-03-27 15:56:19 -05:00
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);
}