syntax_ext: Reuse built-in attribute template checking for macro attributes
This commit is contained in:
parent
433024147a
commit
76b1ffaf6c
9 changed files with 132 additions and 113 deletions
|
|
@ -2,7 +2,7 @@ error: malformed `global_allocator` attribute input
|
|||
--> $DIR/allocator-args.rs:10:1
|
||||
|
|
||||
LL | #[global_allocator(malloc)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: ``#[global_allocator]``
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[global_allocator]`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,13 @@
|
|||
error: malformed `bench` attribute input
|
||||
--> $DIR/issue-43106-gating-of-bench.rs:15:1
|
||||
|
|
||||
LL | #![bench = "4100"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[bench]`
|
||||
|
||||
error[E0601]: `main` function not found in crate `issue_43106_gating_of_bench`
|
||||
|
|
||||
= note: consider adding a `main` function to `$DIR/issue-43106-gating-of-bench.rs`
|
||||
|
||||
error: aborting due to previous error
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0601`.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,13 @@
|
|||
error: malformed `test` attribute input
|
||||
--> $DIR/issue-43106-gating-of-test.rs:10:1
|
||||
|
|
||||
LL | #![test = "4200"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[test]`
|
||||
|
||||
error[E0601]: `main` function not found in crate `issue_43106_gating_of_test`
|
||||
|
|
||||
= note: consider adding a `main` function to `$DIR/issue-43106-gating-of-test.rs`
|
||||
|
||||
error: aborting due to previous error
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0601`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue