Module syntax::feature_gate [−][src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
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.
Re-exports
use self::AttributeType::*; |
use self::AttributeGate::*; |
use rustc_target::spec::abi::Abi; |
use ast; |
use ast::NodeId; |
use ast::PatKind; |
use ast::RangeEnd; |
use attr; |
use edition::ALL_EDITIONS; |
use edition::Edition; |
use codemap::Spanned; |
use syntax_pos::Span; |
use syntax_pos::DUMMY_SP; |
use errors::DiagnosticBuilder; |
use errors::Handler; |
use errors::FatalError; |
use visit; |
use visit::FnKind; |
use visit::Visitor; |
use parse::ParseSess; |
use symbol::keywords; |
use symbol::Symbol; |
use std::env; |
use std::path; |
Structs
Context |
[ Experimental ]
|
FeatureChecker |
[ Experimental ] A collector for mutually exclusive and interdependent features and their flag spans. |
Features |
[ Experimental ] A set of features to be used by later passes. |
GatedCfg |
[ Experimental ]
|
PostExpansionVisitor |
[ Experimental ]
|
Enums
AttributeGate |
[ Experimental ]
|
AttributeType |
[ Experimental ]
|
GateIssue |
[ Experimental ]
|
GateStrength |
[ Experimental ]
|
Stability |
[ Experimental ]
|
UnstableFeatures |
[ Experimental ]
|
Constants
ACCEPTED_FEATURES |
[ Experimental ] Those language feature has since been Accepted (it was once Active) |
ACTIVE_FEATURES |
[ Experimental ] Represents active features that are currently being implemented or currently being considered for addition/removal. |
BUILTIN_ATTRIBUTES |
[ Experimental ]
|
EXPLAIN_ALLOW_INTERNAL_UNSAFE |
[ Experimental ]
|
EXPLAIN_ALLOW_INTERNAL_UNSTABLE |
[ Experimental ]
|
EXPLAIN_ASM |
[ Experimental ]
|
EXPLAIN_BOX_SYNTAX |
[ Experimental ]
|
EXPLAIN_CONCAT_IDENTS |
[ Experimental ]
|
EXPLAIN_CUSTOM_DERIVE |
[ Experimental ]
|
EXPLAIN_DEPR_CUSTOM_DERIVE |
[ Experimental ]
|
EXPLAIN_DERIVE_UNDERSCORE |
[ Experimental ]
|
EXPLAIN_GLOBAL_ASM |
[ Experimental ]
|
EXPLAIN_LIFETIME_MATCHER |
[ Experimental ]
|
EXPLAIN_LOG_SYNTAX |
[ Experimental ]
|
EXPLAIN_MACROS_IN_EXTERN |
[ Experimental ]
|
EXPLAIN_MACRO_AT_MOST_ONCE_REP |
[ Experimental ]
|
EXPLAIN_PROC_MACROS_IN_EXTERN |
[ Experimental ]
|
EXPLAIN_STMT_ATTR_SYNTAX |
[ Experimental ]
|
EXPLAIN_TRACE_MACROS |
[ Experimental ]
|
EXPLAIN_UNSIZED_TUPLE_COERCION |
[ Experimental ]
|
EXPLAIN_VIS_MATCHER |
[ Experimental ]
|
GATED_CFGS |
[ Experimental ]
|
REMOVED_FEATURES |
[ Experimental ] Represents unstable features which have since been removed (it was once Active) |
STABLE_REMOVED_FEATURES |
[ Experimental ] Represents stable features which have since been removed (it was once Accepted) |
Functions
check_attribute |
[ Experimental ]
|
check_crate |
[ Experimental ]
|
contains_novel_literal |
[ Experimental ]
|
deprecated_attributes |
[ Experimental ]
|
emit_feature_err |
[ Experimental ]
|
feature_err |
[ Experimental ]
|
find_lang_feature_accepted_version |
[ Experimental ]
|
find_lang_feature_issue |
[ Experimental ]
|
get_features |
[ Experimental ]
|
is_builtin_attr |
[ Experimental ]
|
leveled_feature_err |
[ Experimental ]
|
maybe_stage_features |
[ Experimental ]
|