rust-clippy/tests/ui/wrong_macro_span.rs_
Luis de Bethencourt 6f3679b8e4 clean tests/ui/zero_div_zero.rs
Cleaning the empty lines for clarity.
2017-05-11 16:22:32 +01:00

26 lines
476 B
Text

#![feature(plugin)]
#![plugin(clippy)]
#![deny(clippy)]
#![allow(unused, if_let_redundant_pattern_matching)]
fn main() {
#[derive(Debug)]
enum Foo {
A(String),
B,
}
struct Thingy(Foo);
macro_rules! issue_1404 {
($idx:tt) => {{
let thingy = Thingy(Foo::A("Foo".into()));
let t = &thingy;
match t.$idx { Foo::A(ref val) => { println!("42"); }, _ => {} }
}}
}
issue_1404!(0)
}