rust/tests/ui/missing/missing-fields-in-struct-pattern.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
188 B
Rust
Raw Normal View History

struct S(usize, usize, usize, usize);
fn main() {
if let S { a, b, c, d } = S(1, 2, 3, 4) {
//~^ ERROR tuple variant `S` written as struct variant
println!("hi");
}
}