diff options
Diffstat (limited to 'src/test/run-pass/generic-box.rs')
| -rw-r--r-- | src/test/run-pass/generic-box.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/run-pass/generic-box.rs b/src/test/run-pass/generic-box.rs index bb2100a9c98..fa3f971a7f0 100644 --- a/src/test/run-pass/generic-box.rs +++ b/src/test/run-pass/generic-box.rs @@ -10,11 +10,13 @@ #![feature(managed_boxes)] -fn box_it<T:'static>(x: Box<T>) -> @Box<T> { return @x; } +use std::gc::{Gc, GC}; + +fn box_it<T:'static>(x: Box<T>) -> Gc<Box<T>> { return box(GC) x; } struct Box<T> {x: T, y: T, z: T} pub fn main() { - let x: @Box<int> = box_it::<int>(Box{x: 1, y: 2, z: 3}); + let x: Gc<Box<int>> = box_it::<int>(Box{x: 1, y: 2, z: 3}); assert_eq!(x.y, 2); } |
