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.

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ยง

EnabledLangFeature
Information about an enabled language feature.
EnabledLibFeature
Information about an enabled library feature.
Feature
Features
A set of features to be used by later passes.

Enumsยง

AttributeStability
GateIssue
UnstableFeatures

Constantsยง

DEPENDENT_FEATURES
Some features require one or more other features to be enabled.
INCOMPATIBLE_FEATURES
Some features are not allowed to be used together at the same time.

Staticsยง

ACCEPTED_LANG_FEATURES
Formerly unstable features that have now been accepted (stabilized).
BUILTIN_ATTRIBUTES
Attributes that have a special meaning to rustc or rustdoc.
BUILTIN_ATTRIBUTE_SET
REMOVED_LANG_FEATURES
Formerly unstable features that have now been removed.
TRACK_FEATURE
Recording used features in the dependency graph so incremental can replay used features when needed.
UNSTABLE_LANG_FEATURES
Unstable language features that are being implemented or being considered for acceptance (stabilization) or removal.

Functionsยง

find_feature_issue
find_gated_cfg
Find a gated cfg matching name.
find_lang_feature_issue ๐Ÿ”’
is_builtin_attr_name
to_nonzero ๐Ÿ”’

Type Aliasesยง

GatedCfg