rust/tests/ui/nll/user-annotations/normalization.stderr

30 lines
956 B
Plaintext
Raw Normal View History

error[E0597]: `a` does not live long enough
2022-12-25 03:27:14 -06:00
--> $DIR/normalization.rs:10:31
|
2023-01-14 21:06:44 -06:00
LL | let a = 22;
| - binding `a` declared here
2022-12-25 03:27:14 -06:00
LL | let _: <() as Foo>::Out = &a;
| ---------------- ^^ borrowed value does not live long enough
| |
| type annotation requires that `a` is borrowed for `'static`
2022-12-25 03:27:14 -06:00
...
LL | }
| - `a` dropped here while still borrowed
2022-12-25 03:27:14 -06:00
error[E0597]: `a` does not live long enough
--> $DIR/normalization.rs:13:40
|
2023-01-14 21:06:44 -06:00
LL | let a = 22;
| - binding `a` declared here
2022-12-25 03:27:14 -06:00
LL | let _: <&'static () as Foo>::Out = &a;
| ------------------------- ^^ borrowed value does not live long enough
| |
| type annotation requires that `a` is borrowed for `'static`
...
LL | }
| - `a` dropped here while still borrowed
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0597`.