Files
rust/tests/ui/pattern/struct-pattern-on-non-struct-resolve-error.rs

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

8 lines
211 B
Rust
Raw Normal View History

// Regression test for #135209.
// We ensure that we don't try to access fields on a non-struct pattern type.
fn main() {
if let Iterator::Item { .. } = 1 { //~ ERROR E0223
x //~ ERROR E0425
}
}