rust/tests/ui/pattern/pattern-bad-ref-box-order.fixed
2023-11-27 21:38:19 +09:00

15 lines
237 B
Rust

// run-rustfix
#![feature(box_patterns)]
#![allow(dead_code)]
fn foo(f: Option<Box<i32>>) {
match f {
Some(box ref _i) => {},
//~^ ERROR switch the order of `ref` and `box`
None => {}
}
}
fn main() { }