diff options
Diffstat (limited to 'src/test/compile-fail/lint-heap-memory.rs')
| -rw-r--r-- | src/test/compile-fail/lint-heap-memory.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/compile-fail/lint-heap-memory.rs b/src/test/compile-fail/lint-heap-memory.rs index 26cae1aa708..2ec9efe9498 100644 --- a/src/test/compile-fail/lint-heap-memory.rs +++ b/src/test/compile-fail/lint-heap-memory.rs @@ -12,9 +12,10 @@ #![forbid(heap_memory)] #![allow(dead_code)] +use std::gc::{Gc, GC}; struct Foo { - x: @int //~ ERROR type uses managed + x: Gc<int>, //~ ERROR type uses managed } struct Bar { x: Box<int> } //~ ERROR type uses owned @@ -22,7 +23,7 @@ struct Bar { x: Box<int> } //~ ERROR type uses owned fn main() { let _x : Bar = Bar {x : box 10}; //~ ERROR type uses owned - @2; //~ ERROR type uses managed + box(GC) 2; //~ ERROR type uses managed box 2; //~ ERROR type uses owned fn g(_: Box<Clone>) {} //~ ERROR type uses owned |
