diff options
Diffstat (limited to 'src/test/compile-fail/unsendable-class.rs')
| -rw-r--r-- | src/test/compile-fail/unsendable-class.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/test/compile-fail/unsendable-class.rs b/src/test/compile-fail/unsendable-class.rs index 7c9b2f34ae9..65f88ef7126 100644 --- a/src/test/compile-fail/unsendable-class.rs +++ b/src/test/compile-fail/unsendable-class.rs @@ -13,12 +13,14 @@ // Test that a class with an unsendable field can't be // sent +use std::gc::{Gc, GC}; + struct foo { i: int, - j: @String, + j: Gc<String>, } -fn foo(i:int, j: @String) -> foo { +fn foo(i:int, j: Gc<String>) -> foo { foo { i: i, j: j @@ -28,5 +30,5 @@ fn foo(i:int, j: @String) -> foo { fn main() { let cat = "kitty".to_string(); let (tx, _) = channel(); //~ ERROR does not fulfill `Send` - tx.send(foo(42, @(cat))); //~ ERROR does not fulfill `Send` + tx.send(foo(42, box(GC) (cat))); //~ ERROR does not fulfill `Send` } |
