This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +21
-22
lines changed
compiler/rustc_passes/src Expand file tree Collapse file tree 5 files changed +21
-22
lines changed Original file line number Diff line number Diff line change @@ -585,19 +585,14 @@ impl CheckAttrVisitor<'tcx> {
585585 . any ( |m| i_meta. has_name ( * m) )
586586 {
587587 self . tcx . struct_span_lint_hir (
588- UNUSED_ATTRIBUTES ,
588+ INVALID_DOC_ATTRIBUTE ,
589589 hir_id,
590590 i_meta. span ,
591591 |lint| {
592592 lint. build ( & format ! (
593593 "unknown `doc` attribute `{}`" ,
594594 i_meta. name_or_empty( )
595595 ) )
596- . warn (
597- "this was previously accepted by the compiler but is \
598- being phased out; it will become a hard error in \
599- a future release!",
600- )
601596 . emit ( ) ;
602597 } ,
603598 ) ;
Original file line number Diff line number Diff line change 11#![ crate_type = "lib" ]
2- #![ deny( unused_attributes) ]
3- //~^ NOTE lint level is defined here
2+ #![ deny( warnings) ]
43#![ doc( as_ptr) ]
54//~^ ERROR unknown `doc` attribute
6- //~| WARNING will become a hard error in a future release
5+ //~^^ WARN
76
87#[ doc( as_ptr) ]
98//~^ ERROR unknown `doc` attribute
10- //~| WARNING will become a hard error in a future release
9+ //~^^ WARN
1110pub fn foo ( ) { }
Original file line number Diff line number Diff line change 11error: unknown `doc` attribute `as_ptr`
2- --> $DIR/doc-attr.rs:8 :7
2+ --> $DIR/doc-attr.rs:7 :7
33 |
44LL | #[doc(as_ptr)]
55 | ^^^^^^
66 |
77note: the lint level is defined here
88 --> $DIR/doc-attr.rs:2:9
99 |
10- LL | #![deny(unused_attributes)]
11- | ^^^^^^^^^^^^^^^^^
10+ LL | #![deny(warnings)]
11+ | ^^^^^^^^
12+ = note: `#[deny(invalid_doc_attribute)]` implied by `#[deny(warnings)]`
1213 = 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>
1315
1416error: unknown `doc` attribute `as_ptr`
15- --> $DIR/doc-attr.rs:4 :8
17+ --> $DIR/doc-attr.rs:3 :8
1618 |
1719LL | #![doc(as_ptr)]
1820 | ^^^^^^
1921 |
2022 = 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>
2124
2225error: aborting due to 2 previous errors
2326
Original file line number Diff line number Diff line change 11#![ crate_type = "lib" ]
2- #![ deny( unused_attributes) ]
3- //~^ NOTE lint level is defined here
2+ #![ deny( warnings) ]
43#![ doc( as_ptr) ]
54//~^ ERROR unknown `doc` attribute
6- //~| WARNING will become a hard error in a future release
5+ //~^^ WARN
76
87#[ doc( as_ptr) ]
98//~^ ERROR unknown `doc` attribute
10- //~| WARNING will become a hard error in a future release
9+ //~^^ WARN
1110pub fn foo ( ) { }
Original file line number Diff line number Diff line change 11error: unknown `doc` attribute `as_ptr`
2- --> $DIR/doc-attr.rs:8 :7
2+ --> $DIR/doc-attr.rs:7 :7
33 |
44LL | #[doc(as_ptr)]
55 | ^^^^^^
66 |
77note: the lint level is defined here
88 --> $DIR/doc-attr.rs:2:9
99 |
10- LL | #![deny(unused_attributes)]
11- | ^^^^^^^^^^^^^^^^^
10+ LL | #![deny(warnings)]
11+ | ^^^^^^^^
12+ = note: `#[deny(invalid_doc_attribute)]` implied by `#[deny(warnings)]`
1213 = 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>
1315
1416error: unknown `doc` attribute `as_ptr`
15- --> $DIR/doc-attr.rs:4 :8
17+ --> $DIR/doc-attr.rs:3 :8
1618 |
1719LL | #![doc(as_ptr)]
1820 | ^^^^^^
1921 |
2022 = 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>
2124
2225error: aborting due to 2 previous errors
2326
You can’t perform that action at this time.
0 commit comments