rust/tests/ui/borrowck/non-ADT-struct-pattern-box-pattern-ice-121463.rs

13 lines
350 B
Rust
Raw Normal View History

2024-04-21 19:31:21 +00:00
// issue rust-lang/rust#121463
// ICE non-ADT in struct pattern
#![feature(box_patterns)]
fn main() {
let mut a = E::StructVar { boxed: Box::new(5_i32) };
//~^ ERROR failed to resolve: use of undeclared type `E`
match a {
E::StructVar { box boxed } => { }
//~^ ERROR failed to resolve: use of undeclared type `E`
}
}