fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

1.43.1
481 B12 linesraw
1error[E0521]: borrowed data escapes outside of closure
2  --> $DIR/regions-escape-unboxed-closure.rs:6:23
3   |
4LL |     let mut x: Option<&isize> = None;
5   |         ----- `x` declared here, outside of the closure body
6LL |     with_int(&mut |y| x = Some(y));
7   |                    -  ^^^^^^^^^^^ `y` escapes the closure body here
8   |                    |
9   |                    `y` is a reference that is only valid in the closure body
10
11error: aborting due to previous error
12