blob: d3d17cca4da27a7e65c022f4c766e439d71079f2 [file] [log] [blame]
// run-pass
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
use std::fmt::Display;
fn print_slice<T: Display, const N: usize>(slice: &[T; N]) {
for x in slice.iter() {
println!("{}", x);
}
}
fn main() {
print_slice(&[1, 2, 3]);
}