2012-08-17 18:12:07 -05:00
|
|
|
// Tests that one can't run a destructor twice with the repeated vector
|
|
|
|
// literal syntax.
|
|
|
|
|
|
|
|
struct Foo {
|
2012-09-07 16:50:47 -05:00
|
|
|
x: int,
|
2012-08-17 18:12:07 -05:00
|
|
|
|
|
|
|
drop {
|
|
|
|
io::println("Goodbye!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let a = Foo { x: 3 };
|
2012-08-17 19:11:25 -05:00
|
|
|
let _ = [ a, ..5 ]; //~ ERROR copying a noncopyable value
|
2012-08-17 18:12:07 -05:00
|
|
|
}
|
|
|
|
|