summary refs log tree commit diff
path: root/src/test/ui/span/borrowck-ref-into-rvalue.nll.stderr
blob: c565842c2c0020e5ad0ecd9b50b09e1289d53000 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
error[E0597]: borrowed value does not live long enough
  --> $DIR/borrowck-ref-into-rvalue.rs:13:11
   |
LL |     match Some("Hello".to_string()) {
   |           ^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough
...
LL |     }
   |     - temporary value only lives until here
LL |     println!("{}", *msg);
   |                    ---- borrow later used here
   |
   = note: consider using a `let` binding to create a longer lived value

error: aborting due to previous error

For more information about this error, try `rustc --explain E0597`.