rust/tests/ui/pattern/pattern-bad-ref-box-order.fixed

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
238 B
Rust
Raw Normal View History

//@ 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() { }