diff options
| author | Graydon Hoare <graydon@mozilla.com> | 2010-07-01 18:37:30 -0700 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2010-07-01 18:37:30 -0700 |
| commit | f72774db7abe4b2a6dbb79df5697144fc17ca7de (patch) | |
| tree | 16fdddda1de792f9fc5a8c5a019b44522ddc93c6 | |
| parent | 792d96474ea58d5ce39be3658d58f312d7d82946 (diff) | |
| download | rust-f72774db7abe4b2a6dbb79df5697144fc17ca7de.tar.gz rust-f72774db7abe4b2a6dbb79df5697144fc17ca7de.zip | |
Correct existing reliance on auto-box / unbox behavior in tests.
| -rw-r--r-- | src/test/run-pass/box-unbox.rs | 4 | ||||
| -rw-r--r-- | src/test/run-pass/output-slot-variants.rs | 6 |
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 821ac74cc05..9c00f55c435 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 3dd5ae2e3b5..5142a9b136f 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() { |
