2018-08-31 16:03:56 -05:00
|
|
|
error[E0597]: `b` does not live long enough
|
2019-04-07 10:07:36 -05:00
|
|
|
--> $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);
|
2018-10-14 09:12:02 -05:00
|
|
|
| ------------- ^^ 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`.
|