Skip to content

Commit e9e844f

Browse files
committed
Move regression test for #83512 into doc_keyword.rs
1 parent 2cedd86 commit e9e844f

File tree

4 files changed

+15
-19
lines changed

4 files changed

+15
-19
lines changed

src/test/ui/rustdoc/doc_keyword.rs

+8
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,11 @@ mod foo {
1010

1111
#[doc(keyword = "hall")] //~ ERROR
1212
fn foo() {}
13+
14+
15+
// Regression test for the ICE described in #83512.
16+
trait Foo {
17+
#[doc(keyword = "match")]
18+
//~^ ERROR: `#[doc(keyword = "...")]` can only be used on modules
19+
fn quux() {}
20+
}

src/test/ui/rustdoc/doc_keyword.stderr

+7-1
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,17 @@ error: `#[doc(keyword = "...")]` can only be used on modules
1010
LL | #[doc(keyword = "hall")]
1111
| ^^^^^^^^^^^^^^^^
1212

13+
error: `#[doc(keyword = "...")]` can only be used on modules
14+
--> $DIR/doc_keyword.rs:17:11
15+
|
16+
LL | #[doc(keyword = "match")]
17+
| ^^^^^^^^^^^^^^^^^
18+
1319
error: `#![doc(keyword = "...")]` isn't allowed as a crate-level attribute
1420
--> $DIR/doc_keyword.rs:4:8
1521
|
1622
LL | #![doc(keyword = "hello")]
1723
| ^^^^^^^^^^^^^^^^^
1824

19-
error: aborting due to 3 previous errors
25+
error: aborting due to 4 previous errors
2026

src/test/ui/rustdoc/issue-83512.rs

-10
This file was deleted.

src/test/ui/rustdoc/issue-83512.stderr

-8
This file was deleted.

0 commit comments

Comments
 (0)