]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/empty_line_after_outer_attribute.rs
Auto merge of #3603 - xfix:random-state-lint, r=phansch
[rust.git] / tests / ui / empty_line_after_outer_attribute.rs
index beaa98953da7f6d1fc96adf6fe29dbb195873ede..ede1244df7ed13908882f6cb6dcfdf50e8ccc01c 100644 (file)
@@ -1,5 +1,13 @@
+// Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
 
-#![warn(empty_line_after_outer_attr)]
+#![warn(clippy::empty_line_after_outer_attr)]
 
 // This should produce a warning
 #[crate_type = "lib"]
@@ -67,4 +75,28 @@ pub fn function() -> bool {
     true
 }
 
+// This should not produce a warning
+#[derive(Clone, Copy)]
+pub enum FooFighter {
+    Bar1,
+
+    Bar2,
+
+    Bar3,
+
+    Bar4
+}
+
+// This should not produce a warning because the empty line is inside a block comment
+#[crate_type = "lib"]
+/*
+
+*/
+pub struct S;
+
+// This should not produce a warning
+#[crate_type = "lib"]
+/* test */
+pub struct T;
+
 fn main() { }