UNSTABLE_FEATURES in rustc_lint::builtin - Rust
Description: The `unstable_features` lint detects uses of `#![feature]`.

Skip to main content

## UNSTABLE_FEATURES

# Static UNSTABLE_FEATURES

Source

    static UNSTABLE_FEATURES: &Lint

Expand description

The `unstable_features` lint detects uses of `#![feature]`.

#### §Example

ⓘ

    #![deny(unstable_features)]
    #![feature(test)]

{{produces}}

#### §Explanation

In larger nightly-based projects which

- consist of a multitude of crates where a subset of crates has to compile on stable either unconditionally or depending on a `cfg` flag to for example allow stable users to depend on them,
- don’t use nightly for experimental features but for, e.g., unstable options only,

this lint may come in handy to enforce policies of these kinds.