diff options
Diffstat (limited to 'src/test/compile-fail/new-box-syntax-bad.rs')
| -rw-r--r-- | src/test/compile-fail/new-box-syntax-bad.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/compile-fail/new-box-syntax-bad.rs b/src/test/compile-fail/new-box-syntax-bad.rs index 4b00334899d..543902a7a55 100644 --- a/src/test/compile-fail/new-box-syntax-bad.rs +++ b/src/test/compile-fail/new-box-syntax-bad.rs @@ -14,11 +14,11 @@ // Tests that the new `box` syntax works with unique pointers and GC pointers. use std::gc::Gc; -use std::owned::HEAP; +use std::owned::{Box, HEAP}; pub fn main() { let x: Gc<int> = box(HEAP) 2; //~ ERROR mismatched types let y: Gc<int> = box(HEAP)(1 + 2); //~ ERROR mismatched types - let z: ~int = box(GC)(4 + 5); //~ ERROR mismatched types + let z: Box<int> = box(GC)(4 + 5); //~ ERROR mismatched types } |
