-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add `on_unimplemented" typo suggestions
- Loading branch information
Showing
5 changed files
with
85 additions
and
5 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
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#![deny(unknown_or_malformed_diagnostic_attributes)] | ||
|
||
#[diagnostic::onunimplemented] | ||
//~^ERROR unknown diagnostic attribute | ||
//~^^HELP an attribute with a similar name exists | ||
trait X{} | ||
|
||
#[diagnostic::un_onimplemented] | ||
//~^ERROR unknown diagnostic attribute | ||
//~^^HELP an attribute with a similar name exists | ||
trait Y{} | ||
|
||
#[diagnostic::on_implemented] | ||
//~^ERROR unknown diagnostic attribute | ||
//~^^HELP an attribute with a similar name exists | ||
trait Z{} | ||
|
||
fn main(){} |
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
error: unknown diagnostic attribute | ||
--> $DIR/suggest_typos.rs:3:15 | ||
| | ||
LL | #[diagnostic::onunimplemented] | ||
| ^^^^^^^^^^^^^^^ | ||
| | ||
note: the lint level is defined here | ||
--> $DIR/suggest_typos.rs:1:9 | ||
| | ||
LL | #![deny(unknown_or_malformed_diagnostic_attributes)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
help: an attribute with a similar name exists | ||
| | ||
LL | #[diagnostic::on_unimplemented] | ||
| ~~~~~~~~~~~~~~~~ | ||
|
||
error: unknown diagnostic attribute | ||
--> $DIR/suggest_typos.rs:8:15 | ||
| | ||
LL | #[diagnostic::un_onimplemented] | ||
| ^^^^^^^^^^^^^^^^ | ||
| | ||
help: an attribute with a similar name exists | ||
| | ||
LL | #[diagnostic::on_unimplemented] | ||
| ~~~~~~~~~~~~~~~~ | ||
|
||
error: unknown diagnostic attribute | ||
--> $DIR/suggest_typos.rs:13:15 | ||
| | ||
LL | #[diagnostic::on_implemented] | ||
| ^^^^^^^^^^^^^^ | ||
| | ||
help: an attribute with a similar name exists | ||
| | ||
LL | #[diagnostic::on_unimplemented] | ||
| ~~~~~~~~~~~~~~~~ | ||
|
||
error: aborting due to 3 previous errors | ||
|