[][src]Module syntax::feature_gate

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Feature gating

This module implements the gating necessary for preventing certain compiler features from being used by default. This module will crawl a pre-expanded AST to ensure that there are no features which are used that are not enabled.

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 code for detection of feature gate usage is added, do not remove it again even once the feature becomes stable.

Modules

acceptedInternal

List of the accepted feature gates.

activeInternal

List of the active feature gates.

builtin_attrsInternal

Built-in attributes and cfg flag gating.

checkInternal
removedInternal

List of the removed feature gates.

Structs

BUILTIN_ATTRIBUTE_MAPInternal
FeatureInternal
FeaturesInternal

A set of features to be used by later passes.

GatedCfgInternal

Enums

AttributeGateInternal
AttributeTypeInternal
GateIssueInternal
StabilityInternal
StateInternal
UnstableFeaturesInternal

Constants

BUILTIN_ATTRIBUTESInternal

Attributes that have a special meaning to rustc or rustdoc.

EXPLAIN_STMT_ATTR_SYNTAXInternal
EXPLAIN_UNSIZED_TUPLE_COERCIONInternal
INCOMPLETE_FEATURESInternal

Some features are known to be incomplete and using them is likely to have unanticipated results, such as compiler crashes. We warn the user about these to alert them.

Functions

check_attributeInternal
check_crateInternal
deprecated_attributesInternal
emit_feature_errInternal
feature_errInternal
get_featuresInternal
is_builtin_attrInternal
is_builtin_attr_nameInternal

Type Definitions

BuiltinAttributeInternal