]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/region-invariant-static-error-reporting.nll.stderr
Change NLL compare mode to borrowck=migrate.
[rust.git] / src / test / ui / regions / region-invariant-static-error-reporting.nll.stderr
1 error: borrowed data escapes outside of function
2   --> $DIR/region-invariant-static-error-reporting.rs:25:9
3    |
4 LL | fn unify<'a>(x: Option<Invariant<'a>>, f: fn(Invariant<'a>)) {
5    |              - `x` is a reference that is only valid in the function body
6 LL |     let bad = if x.is_some() {
7 LL |         x.unwrap()
8    |         ^^^^^^^^^^ `x` escapes the function body here
9
10 error: aborting due to previous error
11