rustc_lint_defs::builtin

Static FORBIDDEN_LINT_GROUPS

Source
pub static FORBIDDEN_LINT_GROUPS: &Lint
Expand description

The forbidden_lint_groups lint detects violations of forbid applied to a lint group. Due to a bug in the compiler, these used to be overlooked entirely. They now generate a warning.

§Example

#![forbid(warnings)]
#![warn(bad_style)]

fn main() {}

{{produces}}

If your crate is using #![forbid(warnings)], we recommend that you change to #![deny(warnings)].

§Explanation

Due to a compiler bug, applying forbid to lint groups previously had no effect. The bug is now fixed but instead of enforcing forbid we issue this future-compatibility warning to avoid breaking existing crates.