Add test for Issue 2823
This commit is contained in:
parent
d29328617d
commit
bbc46d527d
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…
x
Reference in New Issue
Block a user