diff options
Diffstat (limited to 'src/test/ui/const-generics/const-generic-array-wrapper.rs')
| -rw-r--r-- | src/test/ui/const-generics/const-generic-array-wrapper.rs | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/test/ui/const-generics/const-generic-array-wrapper.rs b/src/test/ui/const-generics/const-generic-array-wrapper.rs deleted file mode 100644 index 224fc794e32..00000000000 --- a/src/test/ui/const-generics/const-generic-array-wrapper.rs +++ /dev/null @@ -1,19 +0,0 @@ -// run-pass -// revisions: full min - -#![cfg_attr(full, feature(const_generics))] -#![cfg_attr(full, allow(incomplete_features))] - -struct Foo<T, const N: usize>([T; N]); - -impl<T, const N: usize> Foo<T, N> { - fn foo(&self) -> usize { - N - } -} - -fn main() { - let foo = Foo([0u32; 21]); - assert_eq!(foo.0, [0u32; 21]); - assert_eq!(foo.foo(), 21); -} |
