Skip to content

Commit d7e02f4

Browse files
committed
---
yaml --- r: 158965 b: refs/heads/master c: c0a7d55 h: refs/heads/master i: 158963: 86eff9f v: v3
1 parent 5f908a7 commit d7e02f4

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: fb4e618c33789da31614d1d92b7c760df5db426b
2+
refs/heads/master: c0a7d557dbea830ae581ecb3f77f08b7e4daad4a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: f89e975685a3a9f258c996865cdd144a0f30f83c
55
refs/heads/try: f58aad6dce273570fb130b4df008ef9acd5a5be2

trunk/src/test/run-pass/unboxed-closures-move-mutable.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
// Test that mutating a mutable upvar in a capture-by-value unboxed
1515
// closure does not ice (issue #18238) and marks the upvar as used
1616
// mutably so we do not get a spurious warning about it not needing to
17-
// be declared mutable (issue #18336).
17+
// be declared mutable (issue #18336 and #18769)
18+
19+
fn set(x: &mut uint) { *x = 42; }
1820

1921
fn main() {
2022
{
@@ -25,4 +27,12 @@ fn main() {
2527
let mut x = 0u;
2628
move |:| x += 1;
2729
}
30+
{
31+
let mut x = 0u;
32+
move |&mut:| set(&mut x);
33+
}
34+
{
35+
let mut x = 0u;
36+
move |:| set(&mut x);
37+
}
2838
}

0 commit comments

Comments
 (0)