fork/rust
git clone https://git.julia.blue/fork/rust
73528e339aa
1.40.0
1error[E0597]: `*a` does not live long enough 2 --> $DIR/destructor-restrictions.rs:8:10 3 | 4LL | *a.borrow() + 1 5 | ^--------- 6 | | 7 | borrowed value does not live long enough 8 | a temporary with access to the borrow is created here ... 9LL | }; 10 | -- ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `std::cell::Ref<'_, i32>` 11 | | 12 | `*a` dropped here while still borrowed 13 | 14 = note: The temporary is part of an expression at the end of a block. Consider forcing this temporary to be dropped sooner, before the block's local variables are dropped. For example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block. 15 16error: aborting due to previous error 17 18For more information about this error, try `rustc --explain E0597`.