]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/empty_line_after_outer_attribute.rs
Handle nested block comments
[rust.git] / tests / ui / empty_line_after_outer_attribute.rs
index ef78ca530c1907355a49601d07530c60b570b33e..30063dac0a4659ff7c88717df115b86c9b862326 100644 (file)
@@ -58,4 +58,37 @@ mod foo {
 #[allow(missing_docs)]
 fn three_attributes() { assert!(true) }
 
+// This should not produce a warning
+#[doc = "
+Returns the escaped value of the textual representation of
+
+"]
+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() { }