]> git.lizzy.rs Git - rust.git/blob - tests/ui/regions/do-not-suggest-adding-bound-to-opaque-type.stderr
Rollup merge of #107022 - scottmcm:ordering-option-eq, r=m-ou-se
[rust.git] / tests / ui / regions / do-not-suggest-adding-bound-to-opaque-type.stderr
1 error[E0597]: `x` does not live long enough
2   --> $DIR/do-not-suggest-adding-bound-to-opaque-type.rs:9:7
3    |
4 LL |     let x = ();
5    |         - binding `x` declared here
6 LL |     S(&x)
7    |     --^^-
8    |     | |
9    |     | borrowed value does not live long enough
10    |     opaque type requires that `x` is borrowed for `'static`
11 LL | }
12    | - `x` dropped here while still borrowed
13
14 error: aborting due to previous error
15
16 For more information about this error, try `rustc --explain E0597`.