2018-11-26 20:59:49 -06:00
|
|
|
//! # Feature gating
|
2013-10-02 20:10:16 -05:00
|
|
|
//!
|
2015-04-16 02:18:29 -05:00
|
|
|
//! This module implements the gating necessary for preventing certain compiler
|
2013-10-02 20:10:16 -05:00
|
|
|
//! 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
|
2014-06-22 12:29:42 -05:00
|
|
|
//! `#![feature(...)]` with a comma-separated list of features.
|
2015-01-14 21:27:45 -06:00
|
|
|
//!
|
|
|
|
//! 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.
|
2015-02-03 16:31:06 -06:00
|
|
|
|
2019-08-20 11:40:53 -05:00
|
|
|
mod accepted;
|
2019-08-20 11:41:18 -05:00
|
|
|
mod removed;
|
2019-08-20 11:50:33 -05:00
|
|
|
mod active;
|
2019-08-22 11:32:31 -05:00
|
|
|
mod builtin_attrs;
|
2019-08-22 16:48:08 -05:00
|
|
|
mod check;
|
|
|
|
|
|
|
|
pub use active::{Features, INCOMPLETE_FEATURES};
|
2019-08-22 11:32:31 -05:00
|
|
|
pub use builtin_attrs::{
|
|
|
|
AttributeGate, AttributeType, GatedCfg,
|
|
|
|
BuiltinAttribute, BUILTIN_ATTRIBUTES, BUILTIN_ATTRIBUTE_MAP,
|
|
|
|
deprecated_attributes, is_builtin_attr, is_builtin_attr_name,
|
|
|
|
};
|
2019-08-22 16:48:08 -05:00
|
|
|
pub use check::{
|
|
|
|
check_attribute, check_crate, get_features, feature_err, emit_feature_err,
|
|
|
|
Stability, GateIssue, UnstableFeatures,
|
|
|
|
EXPLAIN_STMT_ATTR_SYNTAX, EXPLAIN_UNSIZED_TUPLE_COERCION,
|
2019-03-21 13:40:00 -05:00
|
|
|
};
|