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

10 lines
164 B
Rust
Raw Normal View History

2012-12-06 16:13:40 -08:00
// xfail-test
fn main()
{
// See #2969 -- error message should be improved
let mut x = [mut 1, 2, 4];
let v : &int = &x[2];
x[2] = 6;
assert *v == 6;
}