diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-04-28 07:34:03 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-28 07:34:03 +0200 |
| commit | 901bab70d34748379331f1c1f069f57029f46b5e (patch) | |
| tree | 6b5d8adddfd999b4d5bc36a786745db63bface3d /tests/ui/attributes/invalid_macro_export_argument.rs | |
| parent | 8ce92daa854e329f4fb7ac75c28dbeea3f5bb125 (diff) | |
| parent | 0279922157761fa103c6be1792d2c3f77e5a61a3 (diff) | |
| download | rust-901bab70d34748379331f1c1f069f57029f46b5e.tar.gz rust-901bab70d34748379331f1c1f069f57029f46b5e.zip | |
Rollup merge of #110913 - compiler-errors:missing-lints, r=Nilstrieb
Add some missing built-in lints (and also sort them, so this is best reviewed one commit at a time) Fixes #110911 I wonder if there's a good way to detect when a lint is built-in (i.e. not associated to a lint pass). If so, it needs to be added to this list, or else we're unable to `allow` or `deny` it. Leaving that for future work, I guess...
Diffstat (limited to 'tests/ui/attributes/invalid_macro_export_argument.rs')
| -rw-r--r-- | tests/ui/attributes/invalid_macro_export_argument.rs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/ui/attributes/invalid_macro_export_argument.rs b/tests/ui/attributes/invalid_macro_export_argument.rs index 85d009f11a6..a0ed5fd1c8f 100644 --- a/tests/ui/attributes/invalid_macro_export_argument.rs +++ b/tests/ui/attributes/invalid_macro_export_argument.rs @@ -1,10 +1,17 @@ -// check-pass -#[macro_export(hello, world)] //~ WARN `#[macro_export]` can only take 1 or 0 arguments +// revisions: deny allow +//[allow] check-pass + +#![cfg_attr(deny, deny(invalid_macro_export_arguments))] +#![cfg_attr(allow, allow(invalid_macro_export_arguments))] + +#[macro_export(hello, world)] +//[deny]~^ ERROR `#[macro_export]` can only take 1 or 0 arguments macro_rules! a { () => () } -#[macro_export(not_local_inner_macros)] //~ WARN `not_local_inner_macros` isn't a valid `#[macro_export]` argument +#[macro_export(not_local_inner_macros)] +//[deny]~^ ERROR `not_local_inner_macros` isn't a valid `#[macro_export]` argument macro_rules! b { () => () } |
