Ensure that we don't try to access fields on a non-struct pattern type in diagnostic
Fix #135209.
This commit is contained in:
parent
ad211ced81
commit
5f04f98c9a
3 changed files with 38 additions and 1 deletions
|
@ -0,0 +1,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
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue