]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-40510-1.nll.stderr
Update output for borrowck=migrate compare mode.
[rust.git] / src / test / ui / issues / issue-40510-1.nll.stderr
1 warning: captured variable cannot escape `FnMut` closure body
2   --> $DIR/issue-40510-1.rs:18:9
3    |
4 LL |     || {
5    |      - inferred to be a `FnMut` closure
6 LL |         &mut x
7    |         ^^^^^^ returns a reference to a captured variable which escapes the closure body
8    |
9    = note: `FnMut` closures only have access to their captured variables while they are executing...
10    = note: ...therefore, they cannot allow references to captured variables to escape
11    = warning: This error has been downgraded to a warning for backwards compatibility with previous releases.
12            It represents potential unsoundness in your code.
13            This warning will become a hard error in the future.
14
15 error: compilation successful
16   --> $DIR/issue-40510-1.rs:23:1
17    |
18 LL | fn main() {} //~ ERROR compilation successful
19    | ^^^^^^^^^^^^
20
21 error: aborting due to previous error
22