[][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.

Structs

AttributeTemplateInternal

A template that the attribute input must match. Only top-level shape (#[attr] vs #[attr(...)] vs #[attr = ...]) is considered now.

BUILTIN_ATTRIBUTE_MAPInternal
ContextInternal
FeaturesInternal

A set of features to be used by later passes.

GatedCfgInternal
PostExpansionVisitorInternal

Enums

AttributeGateInternal
AttributeTypeInternal
GateIssueInternal
GateStrengthInternal
StabilityInternal
UnstableFeaturesInternal

Constants

ACCEPTED_FEATURESInternal

Those language feature has since been Accepted (it was once Active)

ACTIVE_FEATURESInternal

Represents active features that are currently being implemented or currently being considered for addition/removal.

BUILTIN_ATTRIBUTESInternal

Attributes that have a special meaning to rustc or rustdoc

EXPLAIN_ALLOW_INTERNAL_UNSAFEInternal
EXPLAIN_ALLOW_INTERNAL_UNSTABLEInternal
EXPLAIN_ASMInternal
EXPLAIN_BOX_SYNTAXInternal
EXPLAIN_CONCAT_IDENTSInternal
EXPLAIN_CUSTOM_TEST_FRAMEWORKSInternal
EXPLAIN_FORMAT_ARGS_NLInternal
EXPLAIN_GLOBAL_ASMInternal
EXPLAIN_LOG_SYNTAXInternal
EXPLAIN_STMT_ATTR_SYNTAXInternal
EXPLAIN_TRACE_MACROSInternal
EXPLAIN_UNSIZED_TUPLE_COERCIONInternal
GATED_CFGSInternal
INCOMPLETE_FEATURESInternal
REMOVED_FEATURESInternal

Represents unstable features which have since been removed (it was once Active)

STABLE_REMOVED_FEATURESInternal

Represents stable features which have since been removed (it was once Accepted)

Statics

BUILTIN_ATTRIBUTE_MAPInternal

Functions

check_attributeInternal
check_crateInternal
deprecated_attributesInternal
emit_feature_errInternal
feature_errInternal
find_lang_feature_issueInternal
get_featuresInternal
is_builtin_attrInternal
is_builtin_attr_nameInternal
leveled_feature_errInternal
maybe_stage_featuresInternal

Type Definitions

BuiltinAttributeInternal