mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
Rollup merge of #150127 - Bryntet:parse_rustc_lint_untracked_query_information, r=JonathanBrouwer
Port `#[rustc_lint_untracked_query_information]` and `#[rustc_lint_diagnostics]` to using attribute parsers r? ``@JonathanBrouwer``
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
#![feature(rustc_attrs)]
|
||||
|
||||
#[rustc_lint_diagnostics]
|
||||
//~^ ERROR attribute should be applied to a function
|
||||
//~^ ERROR `#[rustc_lint_diagnostics]` attribute cannot be used on structs
|
||||
struct Foo;
|
||||
|
||||
impl Foo {
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
error: malformed `rustc_lint_diagnostics` attribute input
|
||||
--> $DIR/diagnostics_incorrect.rs:10:5
|
||||
|
|
||||
LL | #[rustc_lint_diagnostics(a)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[rustc_lint_diagnostics]`
|
||||
|
||||
error: attribute should be applied to a function definition
|
||||
error: `#[rustc_lint_diagnostics]` attribute cannot be used on structs
|
||||
--> $DIR/diagnostics_incorrect.rs:5:1
|
||||
|
|
||||
LL | #[rustc_lint_diagnostics]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL |
|
||||
LL | struct Foo;
|
||||
| ----------- not a function definition
|
||||
|
|
||||
= help: `#[rustc_lint_diagnostics]` can only be applied to functions
|
||||
|
||||
error[E0565]: malformed `rustc_lint_diagnostics` attribute input
|
||||
--> $DIR/diagnostics_incorrect.rs:10:5
|
||||
|
|
||||
LL | #[rustc_lint_diagnostics(a)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^---^
|
||||
| | |
|
||||
| | didn't expect any arguments here
|
||||
| help: must be of the form: `#[rustc_lint_diagnostics]`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0565`.
|
||||
|
||||
Reference in New Issue
Block a user