Skip to content

Commit c3f0aa9

Browse files
committed
test: Fix last-use-corner-cases. rs=bustage
1 parent 57e4ed4 commit c3f0aa9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/run-pass/last-use-corner-cases.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ fn main() {
2020

2121
// But only when it really is the last use
2222
let q = ~20;
23-
let f = fn@() -> *int { ptr::addr_of(&(*q)) };
23+
let f = fn@(copy q) -> *int { ptr::addr_of(&(*q)) };
2424
assert ptr::addr_of(&(*q)) != f();
2525

2626
// Ensure function arguments and box arguments interact sanely.
2727
fn call_me(x: fn() -> int, y: ~int) { assert x() == *y; }
2828
let q = ~30;
29-
call_me({|| *q}, q);
29+
call_me({|copy q| *q}, q);
3030

3131
// Check that no false positives are found in loops.
3232
let mut q = ~40, p = 10;

0 commit comments

Comments
 (0)