Static rustc_ap_rustc_lint_defs::builtin::ILL_FORMED_ATTRIBUTE_INPUT[][src]

pub static ILL_FORMED_ATTRIBUTE_INPUT: &Lint
Expand description

The ill_formed_attribute_input lint detects ill-formed attribute inputs that were previously accepted and used in practice.

Example

#[inline = "this is not valid"]
fn foo() {}

{{produces}}

Explanation

Previously, inputs for many built-in attributes weren’t validated and nonsensical attribute inputs were accepted. After validation was added, it was determined that some existing projects made use of these invalid forms. This is a future-incompatible lint to transition this to a hard error in the future. See issue #57571 for more details.

Check the attribute reference for details on the valid inputs for attributes.