diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-10-15 17:12:42 -0700 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-10-15 17:12:42 -0700 |
| commit | bbc46d527d70ac0bcab6c2b0763f059efc27a142 (patch) | |
| tree | 262471900177440041c00974e6298996e1e92a0a | |
| parent | d29328617da4704063fca25792bda6811e18ad1b (diff) | |
| download | rust-bbc46d527d70ac0bcab6c2b0763f059efc27a142.tar.gz rust-bbc46d527d70ac0bcab6c2b0763f059efc27a142.zip | |
Add test for Issue 2823
| -rw-r--r-- | src/test/compile-fail/issue-2823.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/compile-fail/issue-2823.rs b/src/test/compile-fail/issue-2823.rs new file mode 100644 index 00000000000..fd2c1758458 --- /dev/null +++ b/src/test/compile-fail/issue-2823.rs @@ -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); +} \ No newline at end of file |
