forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#82702 - jyn514:downgrade-err, r=Manishearth
Change error about unknown attributes to a warning Hard errors should go through a future-compatibility phase first, especially since these attributes only have no effect and don't actively cause bugs. Follow-up to rust-lang#82662. Fixes ecosystem breakage like rust-lang/rust-clippy#6832. r? `@GuillaumeGomez`
- Loading branch information
Showing
5 changed files
with
54 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
#![crate_type = "lib"] | ||
#![doc(as_ptr)] //~ ERROR | ||
#![deny(unused_attributes)] | ||
//~^ NOTE lint level is defined here | ||
#![doc(as_ptr)] | ||
//~^ ERROR unknown `doc` attribute | ||
//~| WARNING will become a hard error in a future release | ||
|
||
#[doc(as_ptr)] //~ ERROR | ||
#[doc(as_ptr)] | ||
//~^ ERROR unknown `doc` attribute | ||
//~| WARNING will become a hard error in a future release | ||
pub fn foo() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,23 @@ | ||
error: unknown `doc` attribute `as_ptr` | ||
--> $DIR/doc-attr.rs:4:7 | ||
--> $DIR/doc-attr.rs:8:7 | ||
| | ||
LL | #[doc(as_ptr)] | ||
| ^^^^^^ | ||
| | ||
note: the lint level is defined here | ||
--> $DIR/doc-attr.rs:2:9 | ||
| | ||
LL | #![deny(unused_attributes)] | ||
| ^^^^^^^^^^^^^^^^^ | ||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
|
||
error: unknown `doc` attribute `as_ptr` | ||
--> $DIR/doc-attr.rs:2:8 | ||
--> $DIR/doc-attr.rs:4:8 | ||
| | ||
LL | #![doc(as_ptr)] | ||
| ^^^^^^ | ||
| | ||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
|
||
error: aborting due to 2 previous errors | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
#![crate_type = "lib"] | ||
#![doc(as_ptr)] //~ ERROR | ||
#![deny(unused_attributes)] | ||
//~^ NOTE lint level is defined here | ||
#![doc(as_ptr)] | ||
//~^ ERROR unknown `doc` attribute | ||
//~| WARNING will become a hard error in a future release | ||
|
||
#[doc(as_ptr)] //~ ERROR | ||
#[doc(as_ptr)] | ||
//~^ ERROR unknown `doc` attribute | ||
//~| WARNING will become a hard error in a future release | ||
pub fn foo() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,23 @@ | ||
error: unknown `doc` attribute `as_ptr` | ||
--> $DIR/doc-attr.rs:4:7 | ||
--> $DIR/doc-attr.rs:8:7 | ||
| | ||
LL | #[doc(as_ptr)] | ||
| ^^^^^^ | ||
| | ||
note: the lint level is defined here | ||
--> $DIR/doc-attr.rs:2:9 | ||
| | ||
LL | #![deny(unused_attributes)] | ||
| ^^^^^^^^^^^^^^^^^ | ||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
|
||
error: unknown `doc` attribute `as_ptr` | ||
--> $DIR/doc-attr.rs:2:8 | ||
--> $DIR/doc-attr.rs:4:8 | ||
| | ||
LL | #![doc(as_ptr)] | ||
| ^^^^^^ | ||
| | ||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
|
||
error: aborting due to 2 previous errors | ||
|