1 // Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution.
4 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
5 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
6 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
7 // option. This file may not be copied, modified, or distributed
8 // except according to those terms.
11 #![allow(unused_variables)]
12 #![allow(unused_assignments)]
13 #![allow(clippy::if_same_then_else)]
14 #![allow(clippy::deref_addrof)]
16 fn foo() -> bool { true }
19 // weird `else` formatting:
28 let _ = { // if as the last expression
38 let _ = { // if in the middle of a block
61 if foo() { // the span of the above error should continue here
67 if foo() { // the span of the above error should continue here
104 // weird op_eq formatting:
117 // possible missing comma in an array
119 -1, -2, -3 // <= no comma here
123 -1, -2, -3 // <= no comma here
141 // don't lint for bin op without unary equiv