Add test for Issue 2823
This commit is contained in:
parent
d29328617d
commit
bbc46d527d
1 changed files with 12 additions and 0 deletions
12
src/test/compile-fail/issue-2823.rs
Normal file
12
src/test/compile-fail/issue-2823.rs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
struct C {
|
||||
x: int,
|
||||
drop {
|
||||
#error("dropping: %?", self.x);
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let c = C{ x: 2};
|
||||
let d = copy c; //~ ERROR copying a noncopyable value
|
||||
#error("%?", d.x);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue