rust/tests/ui/nll/relate_tys/var-appears-twice.stderr

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

18 lines
544 B
Plaintext
Raw Normal View History

2018-08-31 16:03:56 -05:00
error[E0597]: `b` does not live long enough
--> $DIR/var-appears-twice.rs:20:38
2018-08-31 16:03:56 -05:00
|
2023-01-14 21:06:44 -06:00
LL | let b = 44;
| - binding `b` declared here
...
2019-03-09 06:03:44 -06:00
LL | let x: DoubleCell<_> = make_cell(&b);
| ------------- ^^ borrowed value does not live long enough
| |
| type annotation requires that `b` is borrowed for `'static`
2018-08-31 16:03:56 -05:00
...
LL | }
| - `b` dropped here while still borrowed
error: aborting due to previous error
For more information about this error, try `rustc --explain E0597`.