Skip to content

Commit bbc46d5

Browse files
committed
Add test for Issue 2823
1 parent d293286 commit bbc46d5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/test/compile-fail/issue-2823.rs

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
struct C {
2+
x: int,
3+
drop {
4+
#error("dropping: %?", self.x);
5+
}
6+
}
7+
8+
fn main() {
9+
let c = C{ x: 2};
10+
let d = copy c; //~ ERROR copying a noncopyable value
11+
#error("%?", d.x);
12+
}

0 commit comments

Comments
 (0)