blob: 2905af13ccb63ab41698e2820e5ca71e1ba1f4a7 [file] [log] [blame]
#![allow(unused)]
#![warn(clippy::ref_patterns)]
fn use_in_pattern() {
let opt = Some(5);
match opt {
None => {},
Some(ref opt) => {},
//~^ ref_patterns
}
}
fn use_in_binding() {
let x = 5;
let ref y = x;
//~^ ref_patterns
}
fn use_in_parameter(ref x: i32) {}
//~^ ref_patterns
fn main() {}