blob: b8bb6f06f10a16c0654d5d4fabaffa20e32cbeb4 [file] [edit]
//! Test that `deref!(_)` patterns and `Box { .. }` patterns can't be used
//! to match on the same place.
//! This is required for the current implementation of exhaustiveness analysis for deref patterns.
#![feature(deref_patterns)]
fn main() {
match Box::new(0) {
deref!(_) => {} //~ ERROR mix of deref patterns and normal constructors
Box { .. } => {}
}
}