1 // aux-build:proc_macro_attr.rs
2 #![warn(clippy::empty_line_after_outer_attr)]
3 #![allow(clippy::assertions_on_constants)]
4 #![feature(custom_inner_attributes)]
8 extern crate proc_macro_attr;
10 // This should produce a warning
14 fn with_one_newline_and_comment() { assert!(true) }
16 // This should not produce a warning
19 fn with_no_newline_and_comment() { assert!(true) }
22 // This should produce a warning
25 fn with_one_newline() { assert!(true) }
27 // This should produce a warning, too
31 fn with_two_newlines() { assert!(true) }
34 // This should produce a warning
42 // This should produce a warning
50 // This should produce a warning
56 /// This doc comment should not produce a warning
58 /** This is also a doc comment and should not produce a warning
61 // This should not produce a warning
62 #[allow(non_camel_case_types)]
63 #[allow(missing_docs)]
64 #[allow(missing_docs)]
65 fn three_attributes() { assert!(true) }
67 // This should not produce a warning
69 Returns the escaped value of the textual representation of
72 pub fn function() -> bool {
76 // This should not produce a warning
77 #[derive(Clone, Copy)]
88 // This should not produce a warning because the empty line is inside a block comment
95 // This should not produce a warning
100 // This should not produce a warning
101 // See https://github.com/rust-lang/rust-clippy/issues/5567
104 fn foo() -> Vec<u8> {