diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-09-22 14:55:08 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-09-22 14:55:08 -0700 |
| commit | 1367f2b63e33e8b00ca287e146cf10ba67b64094 (patch) | |
| tree | e12e399d0f418ebca3820af9a10d3850b3a6d70c | |
| parent | 3bb70359140062125405c6f592bd23dc34280e4b (diff) | |
| download | rust-1367f2b63e33e8b00ca287e146cf10ba67b64094.tar.gz rust-1367f2b63e33e8b00ca287e146cf10ba67b64094.zip | |
Add a test for unique boxes as fn args
Issue #409
| -rw-r--r-- | src/test/run-pass/unique-fn-arg.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/run-pass/unique-fn-arg.rs b/src/test/run-pass/unique-fn-arg.rs new file mode 100644 index 00000000000..c4a591c3e79 --- /dev/null +++ b/src/test/run-pass/unique-fn-arg.rs @@ -0,0 +1,9 @@ +fn f(i: ~int) { + assert *i == 100; +} + +fn main() { + f(~100); + let i = ~100; + f(i); +} \ No newline at end of file |
