File tree 5 files changed +21
-22
lines changed
compiler/rustc_passes/src
5 files changed +21
-22
lines changed Original file line number Diff line number Diff line change @@ -585,19 +585,14 @@ impl CheckAttrVisitor<'tcx> {
585
585
. any ( |m| i_meta. has_name ( * m) )
586
586
{
587
587
self . tcx . struct_span_lint_hir (
588
- UNUSED_ATTRIBUTES ,
588
+ INVALID_DOC_ATTRIBUTE ,
589
589
hir_id,
590
590
i_meta. span ,
591
591
|lint| {
592
592
lint. build ( & format ! (
593
593
"unknown `doc` attribute `{}`" ,
594
594
i_meta. name_or_empty( )
595
595
) )
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
- )
601
596
. emit ( ) ;
602
597
} ,
603
598
) ;
Original file line number Diff line number Diff line change 1
1
#![ crate_type = "lib" ]
2
- #![ deny( unused_attributes) ]
3
- //~^ NOTE lint level is defined here
2
+ #![ deny( warnings) ]
4
3
#![ doc( as_ptr) ]
5
4
//~^ ERROR unknown `doc` attribute
6
- //~| WARNING will become a hard error in a future release
5
+ //~^^ WARN
7
6
8
7
#[ doc( as_ptr) ]
9
8
//~^ ERROR unknown `doc` attribute
10
- //~| WARNING will become a hard error in a future release
9
+ //~^^ WARN
11
10
pub fn foo ( ) { }
Original file line number Diff line number Diff line change 1
1
error: unknown `doc` attribute `as_ptr`
2
- --> $DIR/doc-attr.rs:8 :7
2
+ --> $DIR/doc-attr.rs:7 :7
3
3
|
4
4
LL | #[doc(as_ptr)]
5
5
| ^^^^^^
6
6
|
7
7
note: the lint level is defined here
8
8
--> $DIR/doc-attr.rs:2:9
9
9
|
10
- LL | #![deny(unused_attributes)]
11
- | ^^^^^^^^^^^^^^^^^
10
+ LL | #![deny(warnings)]
11
+ | ^^^^^^^^
12
+ = note: `#[deny(invalid_doc_attribute)]` implied by `#[deny(warnings)]`
12
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>
13
15
14
16
error: unknown `doc` attribute `as_ptr`
15
- --> $DIR/doc-attr.rs:4 :8
17
+ --> $DIR/doc-attr.rs:3 :8
16
18
|
17
19
LL | #![doc(as_ptr)]
18
20
| ^^^^^^
19
21
|
20
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>
21
24
22
25
error: aborting due to 2 previous errors
23
26
Original file line number Diff line number Diff line change 1
1
#![ crate_type = "lib" ]
2
- #![ deny( unused_attributes) ]
3
- //~^ NOTE lint level is defined here
2
+ #![ deny( warnings) ]
4
3
#![ doc( as_ptr) ]
5
4
//~^ ERROR unknown `doc` attribute
6
- //~| WARNING will become a hard error in a future release
5
+ //~^^ WARN
7
6
8
7
#[ doc( as_ptr) ]
9
8
//~^ ERROR unknown `doc` attribute
10
- //~| WARNING will become a hard error in a future release
9
+ //~^^ WARN
11
10
pub fn foo ( ) { }
Original file line number Diff line number Diff line change 1
1
error: unknown `doc` attribute `as_ptr`
2
- --> $DIR/doc-attr.rs:8 :7
2
+ --> $DIR/doc-attr.rs:7 :7
3
3
|
4
4
LL | #[doc(as_ptr)]
5
5
| ^^^^^^
6
6
|
7
7
note: the lint level is defined here
8
8
--> $DIR/doc-attr.rs:2:9
9
9
|
10
- LL | #![deny(unused_attributes)]
11
- | ^^^^^^^^^^^^^^^^^
10
+ LL | #![deny(warnings)]
11
+ | ^^^^^^^^
12
+ = note: `#[deny(invalid_doc_attribute)]` implied by `#[deny(warnings)]`
12
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>
13
15
14
16
error: unknown `doc` attribute `as_ptr`
15
- --> $DIR/doc-attr.rs:4 :8
17
+ --> $DIR/doc-attr.rs:3 :8
16
18
|
17
19
LL | #![doc(as_ptr)]
18
20
| ^^^^^^
19
21
|
20
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>
21
24
22
25
error: aborting due to 2 previous errors
23
26
You can’t perform that action at this time.
0 commit comments