2018-01-08 17:22:42 -06:00
|
|
|
|
|
|
|
#![warn(empty_line_after_outer_attr)]
|
|
|
|
|
2018-01-19 01:18:29 -06:00
|
|
|
// This should produce a warning
|
|
|
|
#[crate_type = "lib"]
|
|
|
|
|
|
|
|
/// some comment
|
|
|
|
fn with_one_newline_and_comment() { assert!(true) }
|
|
|
|
|
|
|
|
// This should not produce a warning
|
|
|
|
#[crate_type = "lib"]
|
|
|
|
/// some comment
|
|
|
|
fn with_no_newline_and_comment() { assert!(true) }
|
|
|
|
|
|
|
|
|
2018-01-08 17:22:42 -06:00
|
|
|
// This should produce a warning
|
|
|
|
#[crate_type = "lib"]
|
|
|
|
|
|
|
|
fn with_one_newline() { assert!(true) }
|
|
|
|
|
|
|
|
// This should produce a warning, too
|
|
|
|
#[crate_type = "lib"]
|
|
|
|
|
|
|
|
|
|
|
|
fn with_two_newlines() { assert!(true) }
|
|
|
|
|
2018-01-23 14:32:06 -06:00
|
|
|
|
|
|
|
// This should produce a warning
|
|
|
|
#[crate_type = "lib"]
|
|
|
|
|
|
|
|
enum Baz {
|
|
|
|
One,
|
|
|
|
Two
|
|
|
|
}
|
|
|
|
|
|
|
|
// This should produce a warning
|
|
|
|
#[crate_type = "lib"]
|
|
|
|
|
|
|
|
struct Foo {
|
|
|
|
one: isize,
|
|
|
|
two: isize
|
|
|
|
}
|
|
|
|
|
|
|
|
// This should produce a warning
|
|
|
|
#[crate_type = "lib"]
|
|
|
|
|
|
|
|
mod foo {
|
|
|
|
}
|
|
|
|
|
2018-02-01 00:43:03 -06:00
|
|
|
/// This doc comment should not produce a warning
|
|
|
|
|
|
|
|
/** This is also a doc comment and should not produce a warning
|
|
|
|
*/
|
|
|
|
|
2018-01-08 17:22:42 -06:00
|
|
|
// This should not produce a warning
|
|
|
|
#[allow(non_camel_case_types)]
|
|
|
|
#[allow(missing_docs)]
|
|
|
|
#[allow(missing_docs)]
|
|
|
|
fn three_attributes() { assert!(true) }
|
|
|
|
|
|
|
|
fn main() { }
|