about summary refs log tree commit diff
path: root/src/test/compile-fail/lint-heap-memory.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-12-12 00:02:26 -0800
committerAlex Crichton <alex@alexcrichton.com>2013-12-14 22:56:33 -0800
commit6747d0738a88e7a94171ec7b3f42c837352bc5be (patch)
treee4c3d977e230937ec91a09b4ac8c9d3e63c18fb6 /src/test/compile-fail/lint-heap-memory.rs
parent0f6537fed4417134d72200ab3d46b124a4f2a34c (diff)
downloadrust-6747d0738a88e7a94171ec7b3f42c837352bc5be.tar.gz
rust-6747d0738a88e7a94171ec7b3f42c837352bc5be.zip
Handle more cases in the heap lints
Diffstat (limited to 'src/test/compile-fail/lint-heap-memory.rs')
-rw-r--r--src/test/compile-fail/lint-heap-memory.rs16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/test/compile-fail/lint-heap-memory.rs b/src/test/compile-fail/lint-heap-memory.rs
index b550c227898..c02da1beeb7 100644
--- a/src/test/compile-fail/lint-heap-memory.rs
+++ b/src/test/compile-fail/lint-heap-memory.rs
@@ -19,6 +19,20 @@ struct Foo {
 struct Bar { x: ~int } //~ ERROR type uses owned
 
 fn main() {
-    let _x : Bar = Bar {x : ~10};
+    let _x : Bar = Bar {x : ~10}; //~ ERROR type uses owned
+
+    @2; //~ ERROR type uses managed
+    @[1]; //~ ERROR type uses managed
+    //~^ ERROR type uses managed
+    fn f(_: @Clone) {} //~ ERROR type uses managed
+    @""; //~ ERROR type uses managed
+    //~^ ERROR type uses managed
+
+    ~2; //~ ERROR type uses owned
+    ~[1]; //~ ERROR type uses owned
+    //~^ ERROR type uses owned
+    fn g(_: ~Clone) {} //~ ERROR type uses owned
+    ~""; //~ ERROR type uses owned
     //~^ ERROR type uses owned
+    proc() {}; //~ ERROR type uses owned
 }