]>
Commit | Line | Data |
---|---|---|
223e47cc LB |
1 | // Tests that one can't run a destructor twice with the repeated vector |
2 | // literal syntax. | |
3 | ||
4 | struct Foo { | |
1a4d82fc | 5 | x: isize, |
223e47cc LB |
6 | |
7 | } | |
8 | ||
9 | impl Drop for Foo { | |
1a4d82fc JJ |
10 | fn drop(&mut self) { |
11 | println!("Goodbye!"); | |
223e47cc LB |
12 | } |
13 | } | |
14 | ||
15 | fn main() { | |
16 | let a = Foo { x: 3 }; | |
1a4d82fc | 17 | let _ = [ a; 5 ]; |
1b1a35ee | 18 | //~^ ERROR the trait bound `Foo: Copy` is not satisfied [E0277] |
223e47cc | 19 | } |