File tree 4 files changed +74
-0
lines changed
4 files changed +74
-0
lines changed Original file line number Diff line number Diff line change
1
+ #![ crate_type = "lib" ]
2
+ #![ deny( warnings) ]
3
+
4
+ #[ doc( test( no_crate_inject) ) ] //~ ERROR
5
+ //~^ WARN
6
+ pub fn foo ( ) { }
7
+
8
+ pub mod bar {
9
+ #![ doc( test( no_crate_inject) ) ] //~ ERROR
10
+ //~^ WARN
11
+ }
Original file line number Diff line number Diff line change
1
+ error: `#![doc(test(...)]` is only allowed as a crate level attribute
2
+ --> $DIR/doc-attr2.rs:4:7
3
+ |
4
+ LL | #[doc(test(no_crate_inject))]
5
+ | ^^^^^^^^^^^^^^^^^^^^^
6
+ |
7
+ note: the lint level is defined here
8
+ --> $DIR/doc-attr2.rs:2:9
9
+ |
10
+ LL | #![deny(warnings)]
11
+ | ^^^^^^^^
12
+ = note: `#[deny(invalid_doc_attribute)]` implied by `#[deny(warnings)]`
13
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
14
+ = note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
15
+
16
+ error: `#![doc(test(...)]` is only allowed as a crate level attribute
17
+ --> $DIR/doc-attr2.rs:9:12
18
+ |
19
+ LL | #![doc(test(no_crate_inject))]
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: aborting due to 2 previous errors
26
+
Original file line number Diff line number Diff line change
1
+ #![ crate_type = "lib" ]
2
+ #![ deny( warnings) ]
3
+
4
+ #[ doc( test( no_crate_inject) ) ] //~ ERROR
5
+ //~^ WARN
6
+ pub fn foo ( ) { }
7
+
8
+ pub mod bar {
9
+ #![ doc( test( no_crate_inject) ) ] //~ ERROR
10
+ //~^ WARN
11
+ }
Original file line number Diff line number Diff line change
1
+ error: `#![doc(test(...)]` is only allowed as a crate level attribute
2
+ --> $DIR/doc-attr2.rs:4:7
3
+ |
4
+ LL | #[doc(test(no_crate_inject))]
5
+ | ^^^^^^^^^^^^^^^^^^^^^
6
+ |
7
+ note: the lint level is defined here
8
+ --> $DIR/doc-attr2.rs:2:9
9
+ |
10
+ LL | #![deny(warnings)]
11
+ | ^^^^^^^^
12
+ = note: `#[deny(invalid_doc_attribute)]` implied by `#[deny(warnings)]`
13
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
14
+ = note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
15
+
16
+ error: `#![doc(test(...)]` is only allowed as a crate level attribute
17
+ --> $DIR/doc-attr2.rs:9:12
18
+ |
19
+ LL | #![doc(test(no_crate_inject))]
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: aborting due to 2 previous errors
26
+
You can’t perform that action at this time.
0 commit comments