2025-01-07 22:06:58 +00:00
|
|
|
// Regression test for #135209.
|
|
|
|
|
// We ensure that we don't try to access fields on a non-struct pattern type.
|
|
|
|
|
fn main() {
|
2025-01-08 00:13:43 +00:00
|
|
|
if let <Vec<()> as Iterator>::Item { .. } = 1 {
|
|
|
|
|
//~^ ERROR E0658
|
|
|
|
|
//~| ERROR E0071
|
|
|
|
|
//~| ERROR E0277
|
2025-01-07 22:06:58 +00:00
|
|
|
x //~ ERROR E0425
|
|
|
|
|
}
|
|
|
|
|
}
|