regression: temporary value dropped while borrowed #113237
Closed
Description
https://crater-reports.s3.amazonaws.com/beta-1.71-4/beta-2023-06-25/reg/munge-0.3.0/log.txt
[INFO] [stdout] error[E0716]: temporary value dropped while borrowed
[INFO] [stdout] --> src/lib.rs:194:18
[INFO] [stdout] |
[INFO] [stdout] 194 | a = &mut MaybeUninit::uninit();
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^- temporary value is freed at the end of this statement
[INFO] [stdout] | |
[INFO] [stdout] | creates a temporary value which is freed while still in use
[INFO] [stdout] 195 | b = &mut MaybeUninit::uninit();
[INFO] [stdout] 196 | let _ = a;
[INFO] [stdout] | - borrow later used here
[INFO] [stdout] |
[INFO] [stdout] help: consider using a `let` binding to create a longer lived value
[INFO] [stdout] |
[INFO] [stdout] 194 ~ let binding = MaybeUninit::uninit();
[INFO] [stdout] 195 ~ a = &mut binding;
[INFO] [stdout] |