Closed
Description
When clippy reports a suggestion with a macro in the code, it seems to print the expanded form. Using the example from README.md, you can see it is not behaving as expected:
fn main(){
let x = Some(1u8);
match x {
Some(y) => println!("{:?}", y),
_ => ()
}
}
results in:
warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`, #[warn(single_match)] on by default
--> src\main.rs:3:5
|
3 | match x {
| ^
|
help: try this
| if let Some(y) = x { $ crate :: io :: _print ( format_args ! ( $ ( $ arg ) * ) ) }
= help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#single_match