summary refs log tree commit diff
path: root/tests/ui/pattern/struct-pattern-on-non-struct-resolve-error.rs
blob: 17a5bad0e6c0f079f12c9a6b29e8918da7c2cf78 (plain)
1
2
3
4
5
6
7
8
9
10
// Regression test for #135209.
// We ensure that we don't try to access fields on a non-struct pattern type.
fn main() {
    if let <Vec<()> as Iterator>::Item { .. } = 1 {
        //~^ ERROR E0658
        //~| ERROR E0071
        //~| ERROR E0277
        x //~ ERROR E0425
    }
}