]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-29723.rs
point at private fields in struct literal
[rust.git] / src / test / ui / issues / issue-29723.rs
1 // test for https://github.com/rust-lang/rust/issues/29723
2
3 fn main() {
4     let s = String::new();
5     let _s = match 0 {
6         0 if { drop(s); false } => String::from("oops"),
7         _ => {
8             // This should trigger an error,
9             // s could have been moved from.
10             s
11             //~^ ERROR use of moved value: `s`
12         }
13     };
14 }