Skip to content

Commit

Permalink
Add test for Issue 2823
Browse files Browse the repository at this point in the history
  • Loading branch information
catamorphism committed Oct 16, 2012
1 parent d293286 commit bbc46d5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/test/compile-fail/issue-2823.rs
Original file line number Diff line number Diff line change
@@ -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);
}

0 comments on commit bbc46d5

Please sign in to comment.