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 #![feature(tool_lints)]
15 #![allow(unused_variables)]
16 #![allow(unused_assignments)]
17 #![allow(clippy::if_same_then_else)]
18 #![allow(clippy::deref_addrof)]
20 fn foo() -> bool { true }
23 // weird `else if` formatting:
28 let _ = { // if as the last expression
38 let _ = { // if in the middle of a block
50 if foo() { // the span of the above error should continue here
56 if foo() { // the span of the above error should continue here
79 // weird op_eq formatting:
92 // possible missing comma in an array
94 -1, -2, -3 // <= no comma here
98 -1, -2, -3 // <= no comma here