aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-07-01 18:37:30 -0700
committerGraydon Hoare <[email protected]>2010-07-01 18:37:30 -0700
commitf72774db7abe4b2a6dbb79df5697144fc17ca7de (patch)
tree16fdddda1de792f9fc5a8c5a019b44522ddc93c6
parentBox the integer passed to the handle in obj-drop.rs. No more implicit arg-box... (diff)
downloadrust-f72774db7abe4b2a6dbb79df5697144fc17ca7de.tar.xz
rust-f72774db7abe4b2a6dbb79df5697144fc17ca7de.zip
Correct existing reliance on auto-box / unbox behavior in tests.
-rw-r--r--src/test/run-pass/box-unbox.rs4
-rw-r--r--src/test/run-pass/output-slot-variants.rs6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/test/run-pass/box-unbox.rs b/src/test/run-pass/box-unbox.rs
index 821ac74c..9c00f55c 100644
--- a/src/test/run-pass/box-unbox.rs
+++ b/src/test/run-pass/box-unbox.rs
@@ -1,10 +1,10 @@
type box[T] = tup(@T);
-fn unbox[T](box[T] b) -> T { ret b._0; }
+fn unbox[T](box[T] b) -> T { ret *b._0; }
fn main() {
let int foo = 17;
- let box[int] bfoo = tup(foo);
+ let box[int] bfoo = tup(@foo);
log "see what's in our box";
check (unbox[int](bfoo) == foo);
}
diff --git a/src/test/run-pass/output-slot-variants.rs b/src/test/run-pass/output-slot-variants.rs
index 3dd5ae2e..5142a9b1 100644
--- a/src/test/run-pass/output-slot-variants.rs
+++ b/src/test/run-pass/output-slot-variants.rs
@@ -3,7 +3,7 @@ fn ret_int_i() -> int {
}
fn ret_ext_i() -> @int {
- ret 10;
+ ret @10;
}
fn ret_int_tup() -> tup(int,int) {
@@ -11,7 +11,7 @@ fn ret_int_tup() -> tup(int,int) {
}
fn ret_ext_tup() -> @tup(int,int) {
- ret tup(10, 10);
+ ret @tup(10, 10);
}
fn ret_ext_mem() -> tup(@int, @int) {
@@ -19,7 +19,7 @@ fn ret_ext_mem() -> tup(@int, @int) {
}
fn ret_ext_ext_mem() -> @tup(@int, @int) {
- ret tup(@10, @10);
+ ret @tup(@10, @10);
}
fn main() {