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 17:03:56 -04:00
error[E0597]: `b` does not live long enough
--> $DIR/var-appears-twice.rs:20:38
2018-08-31 17:03:56 -04:00
|
2023-01-15 03:06:44 +00:00
LL | let b = 44;
| - binding `b` declared here
...
2019-03-09 15:03:44 +03: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 17:03:56 -04:00
...
LL | }
| - `b` dropped here while still borrowed
error: aborting due to previous error
For more information about this error, try `rustc --explain E0597`.