Skip to main content

Crate rustc_feature

Crate rustc_feature 

Source
Expand description

ยงFeature gates

This crate declares the set of past and present unstable features in the compiler. Feature gate checking itself is done in rustc_ast_passes/src/feature_gate.rs at the moment.

Features are enabled in programs via the crate-level attributes of #![feature(...)] with a comma-separated list of features.

For the purpose of future feature-tracking, once a feature gate is added, even if it is stabilized or removed, do not remove it. Instead, move the symbol to the accepted or removed modules respectively.

Re-exportsยง

pub use accepted::ACCEPTED_LANG_FEATURES;
pub use builtin_attrs::AttributeStability;
pub use builtin_attrs::BUILTIN_ATTRIBUTE_SET;
pub use builtin_attrs::BUILTIN_ATTRIBUTES;
pub use builtin_attrs::GatedCfg;
pub use builtin_attrs::find_gated_cfg;
pub use builtin_attrs::is_builtin_attr_name;
pub use removed::REMOVED_LANG_FEATURES;
pub use unstable::DEPENDENT_FEATURES;
pub use unstable::DependentFeature;
pub use unstable::EnabledLangFeature;
pub use unstable::EnabledLibFeature;
pub use unstable::Features;
pub use unstable::INCOMPATIBLE_FEATURES;
pub use unstable::TRACK_FEATURE;
pub use unstable::UNSTABLE_LANG_FEATURES;
pub(crate) use std::num::NonZero; ๐Ÿ”’
pub(crate) use rustc_span::Symbol; ๐Ÿ”’

Modulesยง

accepted ๐Ÿ”’
List of the accepted feature gates.
builtin_attrs ๐Ÿ”’
Built-in attributes and cfg flag gating.
removed ๐Ÿ”’
List of the removed feature gates.
unstable ๐Ÿ”’
List of the unstable feature gates.

Structsยง

Feature

Enumsยง

GateIssue
UnstableFeatures

Functionsยง

find_feature_issue
find_lang_feature_issue ๐Ÿ”’
to_nonzero ๐Ÿ”’