]> git.proxmox.com Git - rustc.git/blame - src/test/ui/span/borrowck-ref-into-rvalue.nll.stderr
New upstream version 1.33.0+dfsg1
[rustc.git] / src / test / ui / span / borrowck-ref-into-rvalue.nll.stderr
CommitLineData
0bf4aa26 1error[E0716]: temporary value dropped while borrowed
0731742a 2 --> $DIR/borrowck-ref-into-rvalue.rs:3:11
83c7162d
XL
3 |
4LL | match Some("Hello".to_string()) {
0bf4aa26 5 | ^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use
83c7162d
XL
6...
7LL | }
0bf4aa26 8 | - temporary value is freed at the end of this statement
83c7162d
XL
9LL | println!("{}", *msg);
10 | ---- borrow later used here
b7449926
XL
11 |
12 = note: consider using a `let` binding to create a longer lived value
83c7162d
XL
13
14error: aborting due to previous error
15
0bf4aa26 16For more information about this error, try `rustc --explain E0716`.