Repository navigation
Open
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-future-incompatibilityCategory: Future-incompatibility lintsCategory: Future-incompatibility lintsC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language team
Description
What is this lint about
Previously inputs for many built-in attributes weren't validated and nonsensical attributes like #[no_std(arbitraty, string = "foo")] were accepted.
#57321 introduced a check for top-level shape (#[attr] vs #[attr(...)] vs #[attr = ...]) for built-in attributes that produces an error by default, but produces a warning for incorrect attribute forms available on stable that were actually encountered in practice (during crater run).
Currently the list is
#[doc]
#[ignore(...)]
#[inline = "..."]
#[link]
#[link = "..."], but it can be extended if more regressions are reported.
How to fix this warning/error
Use one of the correct attribute forms suggested by the compiler.
Current status
- Implement basic input validation for built-in attributes #57321 introduces the
ill_formed_attribute_inputlint as warn-by-default - Transition future compat lints to {ERROR, DENY} - Take 2 #65785 makes the
ill_formed_attribute_inputlint deny-by-default - Start reporting future breakage for
ILL_FORMED_ATTRIBUTE_INPUTin dependencies #144544 warns in dependencies - PR ? makes the
ill_formed_attribute_inputlint a hard error
Reacted by Mazdak Farrokhzad
Metadata
Metadata
Assignees
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-future-incompatibilityCategory: Future-incompatibility lintsCategory: Future-incompatibility lintsC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language team
Type
Projects
- StatusShow more project fieldsIdea
Activity
Fix build warning on `#[ignore]` attrbute
Fix build warning on `#[ignore]` attrbute
Fix build warning on `#[ignore]` attrbute
Remove #[link] attributes
Auto merge of #63247 - Centril:compat-to-error, r=<try>
Rollup merge of rust-lang#65785 - Centril:compat-to-error-2, r=oli-obk
Rollup merge of rust-lang#65785 - Centril:compat-to-error-2, r=oli-obk
[-]Tracking issue for `ill_formed_attribute_input` compatibility lint[/-][+]Tracking issue for future-incompatibility lint `ill_formed_attribute_input`[/+]Fixed rust compilation error `#[deny(invalid_macro_export_arguments)]…
fix(log_mod): #[macros_export()] are not accepted by newer compiler
Rollup merge of rust-lang#160904 - mejrs:doc_feature_gating, r=Jonath…
Unrolled build for #160904 in rollup 164099