rust/tests/ui/borrowck/non-ADT-struct-pattern-box-pattern-ice-121463.rs
Matthias Krüger 751f662b70 add test for ice #121463
Fixes #121463
2024-04-21 22:00:38 +02:00

13 lines
350 B
Rust

// 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`
}
}