1 // aux-build:proc_macro_suspicious_else_formatting.rs
3 #![warn(clippy::suspicious_else_formatting)]
5 extern crate proc_macro_suspicious_else_formatting;
6 use proc_macro_suspicious_else_formatting::DeriveBadSpan;
14 // weird `else` formatting:
23 let _ = { // if as the last expression
33 let _ = { // if in the middle of a block
48 // This is fine, though weird. Allman style braces on the else.
57 if foo() { // the span of the above error should continue here
63 if foo() { // the span of the above error should continue here
86 // Almost Allman style braces. Lint these.
103 // #3864 - Allman style braces
112 // #7650 - Don't lint. Proc-macro using bad spans for `if` expressions.
113 #[derive(DeriveBadSpan)]
114 struct _Foo(u32, u32);