We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57e4ed4 commit c3f0aa9Copy full SHA for c3f0aa9
src/test/run-pass/last-use-corner-cases.rs
@@ -20,13 +20,13 @@ fn main() {
20
21
// But only when it really is the last use
22
let q = ~20;
23
- let f = fn@() -> *int { ptr::addr_of(&(*q)) };
+ let f = fn@(copy q) -> *int { ptr::addr_of(&(*q)) };
24
assert ptr::addr_of(&(*q)) != f();
25
26
// Ensure function arguments and box arguments interact sanely.
27
fn call_me(x: fn() -> int, y: ~int) { assert x() == *y; }
28
let q = ~30;
29
- call_me({|| *q}, q);
+ call_me({|copy q| *q}, q);
30
31
// Check that no false positives are found in loops.
32
let mut q = ~40, p = 10;
0 commit comments