]> git.lizzy.rs Git - rust.git/blob - tests/ui/inline-const/const-expr-lifetime-err.stderr
Merge commit '1d8491b120223272b13451fc81265aa64f7f4d5b' into sync-from-rustfmt
[rust.git] / tests / ui / inline-const / const-expr-lifetime-err.stderr
1 error[E0597]: `y` does not live long enough
2   --> $DIR/const-expr-lifetime-err.rs:23:30
3    |
4 LL | fn foo<'a>() {
5    |        -- lifetime `'a` defined here
6 LL |     let y = ();
7 LL |     equate(InvariantRef::new(&y), const { InvariantRef::<'a>::NEW });
8    |            ------------------^^-
9    |            |                 |
10    |            |                 borrowed value does not live long enough
11    |            argument requires that `y` is borrowed for `'a`
12 LL |
13 LL | }
14    | - `y` dropped here while still borrowed
15
16 error: aborting due to previous error
17
18 For more information about this error, try `rustc --explain E0597`.