about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-06-17 23:30:08 +0000
committerbors <bors@rust-lang.org>2021-06-17 23:30:08 +0000
commita6bc43ea846ee568ef4e890d4ac2a4cc03475bfc (patch)
tree8a81d4e386b32177053c95d4e0106c4af53bcf15 /src/test
parent149f4836dd6d9e789a26dca16dc034588866894e (diff)
parent4ec05e04d4abc3497fc35525c6bec5260c48af0c (diff)
downloadrust-a6bc43ea846ee568ef4e890d4ac2a4cc03475bfc.tar.gz
rust-a6bc43ea846ee568ef4e890d4ac2a4cc03475bfc.zip
Auto merge of #86417 - m-ou-se:rollup-vo2y1rz, r=m-ou-se
Rollup of 6 pull requests

Successful merges:

 - #85925 (Linear interpolation)
 - #86202 (Specialize `io::Bytes::size_hint` for more types)
 - #86357 (Rely on libc for correct integer types in os/unix/net/ancillary.rs.)
 - #86388 (Make `s` pre-interned)
 - #86401 (Fix ICE when using `#[doc(keyword = "...")]` on non-items)
 - #86405 (Add incr-comp note for 1.53.0 relnotes)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/rustdoc/doc_keyword.rs8
-rw-r--r--src/test/ui/rustdoc/doc_keyword.stderr8
2 files changed, 15 insertions, 1 deletions
diff --git a/src/test/ui/rustdoc/doc_keyword.rs b/src/test/ui/rustdoc/doc_keyword.rs
index 4c72e7e9684..4518f77ef93 100644
--- a/src/test/ui/rustdoc/doc_keyword.rs
+++ b/src/test/ui/rustdoc/doc_keyword.rs
@@ -10,3 +10,11 @@ mod foo {
 
 #[doc(keyword = "hall")] //~ ERROR
 fn foo() {}
+
+
+// Regression test for the ICE described in #83512.
+trait Foo {
+    #[doc(keyword = "match")]
+    //~^ ERROR: `#[doc(keyword = "...")]` can only be used on modules
+    fn quux() {}
+}
diff --git a/src/test/ui/rustdoc/doc_keyword.stderr b/src/test/ui/rustdoc/doc_keyword.stderr
index 0679bb8c5a7..6ba7034d541 100644
--- a/src/test/ui/rustdoc/doc_keyword.stderr
+++ b/src/test/ui/rustdoc/doc_keyword.stderr
@@ -10,11 +10,17 @@ error: `#[doc(keyword = "...")]` can only be used on modules
 LL | #[doc(keyword = "hall")]
    |       ^^^^^^^^^^^^^^^^
 
+error: `#[doc(keyword = "...")]` can only be used on modules
+  --> $DIR/doc_keyword.rs:17:11
+   |
+LL |     #[doc(keyword = "match")]
+   |           ^^^^^^^^^^^^^^^^^
+
 error: `#![doc(keyword = "...")]` isn't allowed as a crate-level attribute
   --> $DIR/doc_keyword.rs:4:8
    |
 LL | #![doc(keyword = "hello")]
    |        ^^^^^^^^^^^^^^^^^
 
-error: aborting due to 3 previous errors
+error: aborting due to 4 previous errors