-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
find_deprecation: deprecation attr may be ill-formed meta.
- Loading branch information
Showing
3 changed files
with
23 additions
and
1 deletion.
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
11 changes: 11 additions & 0 deletions
11
src/test/ui/deprecation/issue-66340-deprecated-attr-non-meta-grammar.rs
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,11 @@ | ||
// The original problem in #66340 was that `find_deprecation_generic` | ||
// called `attr.meta().unwrap()` under the assumption that the attribute | ||
// was a well-formed `MetaItem`. | ||
|
||
fn main() { | ||
foo() | ||
} | ||
|
||
#[deprecated(note = test)] | ||
//~^ ERROR expected unsuffixed literal or identifier, found `test` | ||
fn foo() {} |
8 changes: 8 additions & 0 deletions
8
src/test/ui/deprecation/issue-66340-deprecated-attr-non-meta-grammar.stderr
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,8 @@ | ||
error: expected unsuffixed literal or identifier, found `test` | ||
--> $DIR/issue-66340-deprecated-attr-non-meta-grammar.rs:9:21 | ||
| | ||
LL | #[deprecated(note = test)] | ||
| ^^^^ | ||
|
||
error: aborting due to previous error | ||
|