rust/src/test/compile-fail/issue-3243.rs

11 lines
192 B
Rust
Raw Normal View History

2012-12-06 20:32:13 -06:00
// xfail-test
fn function() -> &[mut int] {
let mut x: &static/[mut int] = &[mut 1,2,3];
x[0] = 12345;
x //~ ERROR bad
}
fn main() {
let x = function();
error!("%?", x);
}