rust/tests/ui/nll/issue-68550.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
555 B
Plaintext
Raw Normal View History

2020-04-09 10:55:27 +00:00
error[E0597]: `x` does not live long enough
--> $DIR/issue-68550.rs:12:20
|
LL | fn run<'a, A>(x: A)
2023-01-15 03:06:44 +00:00
| -- - binding `x` declared here
| |
| lifetime `'a` defined here
2020-04-09 10:55:27 +00:00
...
LL | let _: &'a A = &x;
| ----- ^^ borrowed value does not live long enough
| |
| type annotation requires that `x` is borrowed for `'a`
LL | }
| - `x` dropped here while still borrowed
error: aborting due to previous error
For more information about this error, try `rustc --explain E0597`.