diff options
| author | lcnr <rust@lcnr.de> | 2021-08-27 18:04:57 +0200 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2021-08-30 11:00:21 +0200 |
| commit | 0c28e028b6f45f33447f24de7dd762b8599b7a4e (patch) | |
| tree | 3a573ebc79c4aefed676f4a693ebb62d32ea4e7f /src/test/ui/const-generics/const-generic-array-wrapper.rs | |
| parent | c0e853f274c42665373b719a5bd7b3f95afe10c2 (diff) | |
| download | rust-0c28e028b6f45f33447f24de7dd762b8599b7a4e.tar.gz rust-0c28e028b6f45f33447f24de7dd762b8599b7a4e.zip | |
`feature(const_generics)` -> `feature(const_param_types)`
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); -} |
