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.
10 #![warn(clippy::empty_line_after_outer_attr)]
12 // This should produce a warning
16 fn with_one_newline_and_comment() { assert!(true) }
18 // This should not produce a warning
21 fn with_no_newline_and_comment() { assert!(true) }
24 // This should produce a warning
27 fn with_one_newline() { assert!(true) }
29 // This should produce a warning, too
33 fn with_two_newlines() { assert!(true) }
36 // This should produce a warning
44 // This should produce a warning
52 // This should produce a warning
58 /// This doc comment should not produce a warning
60 /** This is also a doc comment and should not produce a warning
63 // This should not produce a warning
64 #[allow(non_camel_case_types)]
65 #[allow(missing_docs)]
66 #[allow(missing_docs)]
67 fn three_attributes() { assert!(true) }
69 // This should not produce a warning
71 Returns the escaped value of the textual representation of
74 pub fn function() -> bool {
78 // This should not produce a warning
79 #[derive(Clone, Copy)]
90 // This should not produce a warning because the empty line is inside a block comment
97 // This should not produce a warning