Skip to content

Commit fe64970

Browse files
committed
Add another test case
1 parent 7e972a3 commit fe64970

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

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

+5
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,9 @@ pub fn foo() {}
1717
//~| WARN
1818
//~| ERROR unknown `doc` attribute
1919
//~| WARN
20+
#[doc(foo::bar, crate::bar::baz = "bye")]
21+
//~^ ERROR unknown `doc` attribute
22+
//~| WARN
23+
//~| ERROR unknown `doc` attribute
24+
//~| WARN
2025
fn bar() {}

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

+19-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,24 @@ LL | #[doc("hello", "bar")]
4040
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
4141
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
4242

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+
4361
error: unknown `doc` attribute `as_ptr`
4462
--> $DIR/doc-attr.rs:3:8
4563
|
@@ -49,5 +67,5 @@ LL | #![doc(as_ptr)]
4967
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
5068
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
5169

52-
error: aborting due to 5 previous errors
70+
error: aborting due to 7 previous errors
5371

0 commit comments

Comments
 (0)