rust/src/test/ui/E0508-fail.rs

11 lines
225 B
Rust
Raw Normal View History

// revisions: ast mir
//[mir]compile-flags: -Z borrowck=mir
2016-08-26 00:14:20 +02:00
struct NonCopy;
fn main() {
let array = [NonCopy; 1];
let _value = array[0]; //[ast]~ ERROR [E0508]
//[mir]~^ ERROR [E0508]
2016-08-26 00:14:20 +02:00
}