Skip to content

invalid_macro_export_arguments rustc lint currently can't be "allowed" #110911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
peter-lyons-kehl opened this issue Apr 27, 2023 · 1 comment · Fixed by #110913
Closed

invalid_macro_export_arguments rustc lint currently can't be "allowed" #110911

peter-lyons-kehl opened this issue Apr 27, 2023 · 1 comment · Fixed by #110913
Assignees
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@peter-lyons-kehl
Copy link
Contributor

peter-lyons-kehl commented Apr 27, 2023

rustc lint invalid_macro_export_arguments is (supposedly) set to warn by default (see https://doc.rust-lang.org/nightly/rustc/lints/listing/warn-by-default.html#invalid-macro-export-arguments). Its definition (currently at the bottom of) https://github.com/rust-lang/rust/blob/master/compiler/rustc_lint_defs/src/builtin.rs seems quite standard.

The issue: There doesn't seem to be a way to allow or forbid this lint. Either of the following fails with "unknown lint: invalid_macro_export_arguments":

#![deny(unknown_lints)]
#![forbid(invalid_macro_export_arguments)]

or

#![forbid(unknown_lints)]
#![allow(invalid_macro_export_arguments)]

I've tried that in a simple library crate, with a macro by example or without one. On 1.71.0-nightly (1c42cb4ef 2023-04-26).

If this lint is supposed NOT to be allowed/forbidden, or if it's unstable and it needs a feature flag, please document it.

Similarly for

@compiler-errors compiler-errors self-assigned this Apr 27, 2023
@Noratrieb Noratrieb added A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Apr 28, 2023
@bors bors closed this as completed in 901bab7 Apr 28, 2023
@peter-lyons-kehl
Copy link
Contributor Author

Thank you. Confirming this works on nightly now.

Those lints are now supported by https://crates.io/crates/allow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants