3 #![feature(const_generics)]
4 //~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
6 use std::ops::AddAssign;
8 fn inc<T: AddAssign + Clone, const N: usize>(v: &mut [T; N]) -> &mut [T; N] {
9 for x in v.iter_mut() {
16 let mut v = [1, 2, 3];
18 assert_eq!(v, [2, 4, 6]);