diff options
Diffstat (limited to 'tests/incremental/const-generics/issue-61516.rs')
-rw-r--r-- | tests/incremental/const-generics/issue-61516.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/incremental/const-generics/issue-61516.rs b/tests/incremental/const-generics/issue-61516.rs new file mode 100644 index 000000000..c781484d1 --- /dev/null +++ b/tests/incremental/const-generics/issue-61516.rs @@ -0,0 +1,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); +} |