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 B13 linesraw
1error[E0521]: borrowed data escapes outside of function
2  --> $DIR/region-invariant-static-error-reporting.rs:15:9
3   |
4LL | fn unify<'a>(x: Option<Invariant<'a>>, f: fn(Invariant<'a>)) {
5   |              - `x` is a reference that is only valid in the function body
6LL |     let bad = if x.is_some() {
7LL |         x.unwrap()
8   |         ^^^^^^^^^^ `x` escapes the function body here
9   |
10   = help: consider replacing `'a` with `'static`
11
12error: aborting due to previous error
13