about summary refs log tree commit diff
path: root/tests/ui/borrowck/non-ADT-struct-pattern-box-pattern-ice-121463.rs
blob: cf927e34fb418ab287e5e0b9409d56414a217a0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// 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`
    }
}