[][src]Module syntax::feature_gate

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

BUILTIN_ATTRIBUTE_MAP
Feature
Features

A set of features to be used by later passes.

GatedCfg

Enums

AttributeGate
AttributeType
GateIssue
Stability
State
UnstableFeatures

Constants

BUILTIN_ATTRIBUTES

Attributes that have a special meaning to rustc or rustdoc.

EXPLAIN_STMT_ATTR_SYNTAX
EXPLAIN_UNSIZED_TUPLE_COERCION
INCOMPLETE_FEATURES

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_attribute
check_crate
deprecated_attributes
emit_feature_err
feature_err
get_features
is_builtin_attr
is_builtin_attr_name

Type Definitions

BuiltinAttribute