diff options
Diffstat (limited to 'src/test/ui/const-generics/mut-ref-const-param-array.rs')
| -rw-r--r-- | src/test/ui/const-generics/mut-ref-const-param-array.rs | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/test/ui/const-generics/mut-ref-const-param-array.rs b/src/test/ui/const-generics/mut-ref-const-param-array.rs deleted file mode 100644 index 6a5739db3ae..00000000000 --- a/src/test/ui/const-generics/mut-ref-const-param-array.rs +++ /dev/null @@ -1,21 +0,0 @@ -// run-pass -// revisions: full min - -#![cfg_attr(full, feature(const_generics))] -#![cfg_attr(full, allow(incomplete_features))] - - -use std::ops::AddAssign; - -fn inc<T: AddAssign + Clone, const N: usize>(v: &mut [T; N]) -> &mut [T; N] { - for x in v.iter_mut() { - *x += x.clone(); - } - v -} - -fn main() { - let mut v = [1, 2, 3]; - inc(&mut v); - assert_eq!(v, [2, 4, 6]); -} |
