mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 19:53:46 +00:00
656db98bd9
CC #99430
18 lines
544 B
Plaintext
18 lines
544 B
Plaintext
error[E0597]: `b` does not live long enough
|
|
--> $DIR/var-appears-twice.rs:20:38
|
|
|
|
|
LL | let b = 44;
|
|
| - binding `b` declared here
|
|
...
|
|
LL | let x: DoubleCell<_> = make_cell(&b);
|
|
| ------------- ^^ borrowed value does not live long enough
|
|
| |
|
|
| type annotation requires that `b` is borrowed for `'static`
|
|
...
|
|
LL | }
|
|
| - `b` dropped here while still borrowed
|
|
|
|
error: aborting due to previous error
|
|
|
|
For more information about this error, try `rustc --explain E0597`.
|