about summary refs log tree commit diff
path: root/tests/ui/pattern/struct-pattern-on-non-struct-resolve-error.rs
blob: c74c77fea60f4a7f6717de645a04059bace35e05 (plain)
1
2
3
4
5
6
7
// 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
    }
}