about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tests/rustdoc-ui/lints/check-attr.rs9
-rw-r--r--tests/rustdoc-ui/lints/check-attr.stderr31
2 files changed, 39 insertions, 1 deletions
diff --git a/tests/rustdoc-ui/lints/check-attr.rs b/tests/rustdoc-ui/lints/check-attr.rs
index 38f5b3851d0..3c06e6c076b 100644
--- a/tests/rustdoc-ui/lints/check-attr.rs
+++ b/tests/rustdoc-ui/lints/check-attr.rs
@@ -47,3 +47,12 @@ pub fn b() {}
 /// boo
 /// ```
 pub fn c() {}
+
+/// b
+//~^ ERROR
+//~| ERROR
+///
+/// ```rust2018 shouldpanic
+/// boo
+/// ```
+pub fn d() {}
diff --git a/tests/rustdoc-ui/lints/check-attr.stderr b/tests/rustdoc-ui/lints/check-attr.stderr
index c736fa8a91f..d640125ab51 100644
--- a/tests/rustdoc-ui/lints/check-attr.stderr
+++ b/tests/rustdoc-ui/lints/check-attr.stderr
@@ -196,5 +196,34 @@ LL | | /// ```
    |
    = help: there is an attribute with a similar name: `edition2018`
 
-error: aborting due to 13 previous errors
+error: unknown attribute `rust2018`
+  --> $DIR/check-attr.rs:51:1
+   |
+LL | / /// b
+LL | |
+LL | |
+LL | | ///
+LL | | /// ```rust2018 shouldpanic
+LL | | /// boo
+LL | | /// ```
+   | |_______^
+   |
+   = help: there is an attribute with a similar name: `edition2018`
+
+error: unknown attribute `shouldpanic`
+  --> $DIR/check-attr.rs:51:1
+   |
+LL | / /// b
+LL | |
+LL | |
+LL | | ///
+LL | | /// ```rust2018 shouldpanic
+LL | | /// boo
+LL | | /// ```
+   | |_______^
+   |
+   = help: there is an attribute with a similar name: `should_panic`
+   = help: the code block will either not be tested if not marked as a rust one or won't fail if it doesn't panic when running
+
+error: aborting due to 15 previous errors