2018-08-31 16:03:56 -05:00
|
|
|
error[E0597]: `b` does not live long enough
|
|
|
|
--> $DIR/var-appears-twice.rs:33:38
|
|
|
|
|
|
|
|
|
LL | let x: DoubleCell<_> = make_cell(&b); //~ ERROR
|
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`.
|