summaryrefslogtreecommitdiffstats
path: root/tests/ui/pattern/pattern-bad-ref-box-order.rs
blob: f3fcf0ceacf0b349caaade98cf56cb17460dfdf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// run-rustfix

#![feature(box_patterns)]
#![allow(dead_code)]

fn foo(f: Option<Box<i32>>) {
    match f {
        Some(ref box _i) => {},
        //~^ ERROR switch the order of `ref` and `box`
        None => {}
    }
}

fn main() { }