File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
error: borrowed data cannot be stored outside of its closure
2
- --> $DIR/issue-45983.rs:19 :27
2
+ --> $DIR/issue-45983.rs:20 :27
3
3
|
4
4
LL | let x = None;
5
5
| - borrowed data cannot be stored into here...
Original file line number Diff line number Diff line change 1
1
error[E0521]: borrowed data escapes outside of closure
2
- --> $DIR/issue-45983.rs:19 :18
2
+ --> $DIR/issue-45983.rs:20 :18
3
3
|
4
4
LL | let x = None;
5
5
| - `x` is declared here, outside of the closure body
@@ -9,7 +9,7 @@ LL | give_any(|y| x = Some(y));
9
9
| `y` is a reference that is only valid in the closure body
10
10
11
11
error[E0594]: cannot assign to `x`, as it is not declared as mutable
12
- --> $DIR/issue-45983.rs:19 :18
12
+ --> $DIR/issue-45983.rs:20 :18
13
13
|
14
14
LL | let x = None;
15
15
| - help: consider changing this to be mutable: `mut x`
Original file line number Diff line number Diff line change 7
7
// revisions, don't worry about the --compare-mode=nll on this test.
8
8
9
9
// ignore-compare-mode-nll
10
+ // ignore-compare-mode-polonius
10
11
11
12
//[nll]compile-flags: -Z borrowck=mir
12
13
You can’t perform that action at this time.
0 commit comments