blob: 8f0a19d740782b065a3a082da478e23ec63c24d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
//! Test that `box _` 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(box_patterns)]
fn main() {
match Box::new(0) {
box _ => {} //~ ERROR mix of deref patterns and normal constructors
Box { .. } => {}
}
}
|