rust/src/test/compile-fail/vec-concat-bug.rs
2012-04-11 17:21:53 -07:00

14 lines
311 B
Rust

fn concat<T: copy>(v: [const [const T]]) -> [T] {
let mut r = [];
// Earlier versions of our type checker accepted this:
vec::iter(v) {|&&inner: [T]|
//!^ ERROR values differ in mutability
//!^^ ERROR values differ in mutability
r += inner;
}
ret r;
}
fn main() {}