Skip to content

Commit 13884dc

Browse files
committed
Update rustdoc-ui versions of the doc-attr test
It seems there are two copies of it: one in `src/test/ui/attributes/` and one in `src/test/rustdoc-ui/`. I'm guessing this is to test that the lint is emitted both when you run the compiler and when you run rustdoc.
1 parent 5134047 commit 13884dc

File tree

2 files changed

+61
-1
lines changed

2 files changed

+61
-1
lines changed

src/test/rustdoc-ui/doc-attr.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,18 @@
88
//~^ ERROR unknown `doc` attribute
99
//~^^ WARN
1010
pub fn foo() {}
11+
12+
#[doc(123)]
13+
//~^ ERROR unknown `doc` attribute
14+
//~| WARN
15+
#[doc("hello", "bar")]
16+
//~^ ERROR unknown `doc` attribute
17+
//~| WARN
18+
//~| ERROR unknown `doc` attribute
19+
//~| WARN
20+
#[doc(foo::bar, crate::bar::baz = "bye")]
21+
//~^ ERROR unknown `doc` attribute
22+
//~| WARN
23+
//~| ERROR unknown `doc` attribute
24+
//~| WARN
25+
fn bar() {}

src/test/rustdoc-ui/doc-attr.stderr

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,51 @@ LL | #![deny(warnings)]
1313
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
1414
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
1515

16+
error: unknown `doc` attribute
17+
--> $DIR/doc-attr.rs:12:7
18+
|
19+
LL | #[doc(123)]
20+
| ^^^
21+
|
22+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
23+
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
24+
25+
error: unknown `doc` attribute
26+
--> $DIR/doc-attr.rs:15:7
27+
|
28+
LL | #[doc("hello", "bar")]
29+
| ^^^^^^^
30+
|
31+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
32+
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
33+
34+
error: unknown `doc` attribute
35+
--> $DIR/doc-attr.rs:15:16
36+
|
37+
LL | #[doc("hello", "bar")]
38+
| ^^^^^
39+
|
40+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
41+
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
42+
43+
error: unknown `doc` attribute ``
44+
--> $DIR/doc-attr.rs:20:7
45+
|
46+
LL | #[doc(foo::bar, crate::bar::baz = "bye")]
47+
| ^^^^^^^^
48+
|
49+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
50+
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
51+
52+
error: unknown `doc` attribute ``
53+
--> $DIR/doc-attr.rs:20:17
54+
|
55+
LL | #[doc(foo::bar, crate::bar::baz = "bye")]
56+
| ^^^^^^^^^^^^^^^^^^^^^^^
57+
|
58+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
59+
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
60+
1661
error: unknown `doc` attribute `as_ptr`
1762
--> $DIR/doc-attr.rs:3:8
1863
|
@@ -22,5 +67,5 @@ LL | #![doc(as_ptr)]
2267
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
2368
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
2469

25-
error: aborting due to 2 previous errors
70+
error: aborting due to 7 previous errors
2671

0 commit comments

Comments
 (0)