1 warning: captured variable cannot escape `FnMut` closure body
2 --> $DIR/issue-40510-1.rs:18:9
5 | - inferred to be a `FnMut` closure
7 | ^^^^^^ returns a reference to a captured variable which escapes the closure body
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.
15 error: compilation successful
16 --> $DIR/issue-40510-1.rs:23:1
18 LL | fn main() {} //~ ERROR compilation successful
21 error: aborting due to previous error