diff options
| author | Graydon Hoare <[email protected]> | 2010-07-01 18:37:30 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-07-01 18:37:30 -0700 |
| commit | f72774db7abe4b2a6dbb79df5697144fc17ca7de (patch) | |
| tree | 16fdddda1de792f9fc5a8c5a019b44522ddc93c6 /src/test/run-pass/box-unbox.rs | |
| parent | Box the integer passed to the handle in obj-drop.rs. No more implicit arg-box... (diff) | |
| download | rust-f72774db7abe4b2a6dbb79df5697144fc17ca7de.tar.xz rust-f72774db7abe4b2a6dbb79df5697144fc17ca7de.zip | |
Correct existing reliance on auto-box / unbox behavior in tests.
Diffstat (limited to 'src/test/run-pass/box-unbox.rs')
| -rw-r--r-- | src/test/run-pass/box-unbox.rs | 4 |
1 files changed, 2 insertions, 2 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); } |