]> git.lizzy.rs Git - rust.git/blob - src/test/ui/span/borrowck-ref-into-rvalue.rs
Auto merge of #98051 - davidtwco:split-dwarf-stabilization, r=wesleywiser
[rust.git] / src / test / ui / span / borrowck-ref-into-rvalue.rs
1 // run-rustfix
2 fn main() {
3     let msg;
4     match Some("Hello".to_string()) {
5         //~^ ERROR temporary value dropped while borrowed
6         Some(ref m) => {
7             msg = m;
8         },
9         None => { panic!() }
10     }
11     println!("{}", *msg);
12 }