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.
12 #![warn(clippy::empty_line_after_outer_attr)]
14 // This should produce a warning
18 fn with_one_newline_and_comment() { assert!(true) }
20 // This should not produce a warning
23 fn with_no_newline_and_comment() { assert!(true) }
26 // This should produce a warning
29 fn with_one_newline() { assert!(true) }
31 // This should produce a warning, too
35 fn with_two_newlines() { assert!(true) }
38 // This should produce a warning
46 // This should produce a warning
54 // This should produce a warning
60 /// This doc comment should not produce a warning
62 /** This is also a doc comment and should not produce a warning
65 // This should not produce a warning
66 #[allow(non_camel_case_types)]
67 #[allow(missing_docs)]
68 #[allow(missing_docs)]
69 fn three_attributes() { assert!(true) }
71 // This should not produce a warning
73 Returns the escaped value of the textual representation of
76 pub fn function() -> bool {
80 // This should not produce a warning
81 #[derive(Clone, Copy)]
92 // This should not produce a warning because the empty line is inside a block comment
99 // This should not produce a warning
100 #[crate_type = "lib"]