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