about summary refs log tree commit diff
path: root/src/libsyntax/feature_gate/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-12-01 00:39:18 +0000
committerbors <bors@rust-lang.org>2019-12-01 00:39:18 +0000
commit135ccbaca86ed4b9c0efaf0cd31442eae57ffad7 (patch)
treef5d91a593d425871fff9e1b68ac2e9f982d6c8e1 /src/libsyntax/feature_gate/mod.rs
parentd8bdb3fdcbd88eb16e1a6669236122c41ed2aed3 (diff)
parentb772b5b19d769e7062b032e6e73f6466b26d78bd (diff)
downloadrust-135ccbaca86ed4b9c0efaf0cd31442eae57ffad7.tar.gz
rust-135ccbaca86ed4b9c0efaf0cd31442eae57ffad7.zip
Auto merge of #66908 - Centril:rollup-26givp6, r=Centril
Rollup of 9 pull requests

Successful merges:

 - #66612 (Initial implementation of or-pattern usefulness checking)
 - #66705 (Atomic as_mut_ptr)
 - #66759 (impl TrustedLen for vec::Drain)
 - #66858 (Use LLVMAddAnalysisPasses instead of Rust's wrapper)
 - #66870 (SimplifyArmIdentity only for locals with the same type)
 - #66883 (rustc_typeck: gate AnonConst's generics on feature(const_generics).)
 - #66889 (Make python-generated source files compatible with rustfmt)
 - #66894 (Remove unneeded prelude imports in libcore tests)
 - #66895 (Feature gating *declarations* => new crate `rustc_feature`)

Failed merges:

 - #66905 (rustc_plugin: Remove some remaining plugin features)

r? @ghost
Diffstat (limited to 'src/libsyntax/feature_gate/mod.rs')
-rw-r--r--src/libsyntax/feature_gate/mod.rs71
1 files changed, 0 insertions, 71 deletions
diff --git a/src/libsyntax/feature_gate/mod.rs b/src/libsyntax/feature_gate/mod.rs
deleted file mode 100644
index c4418c0f0f6..00000000000
--- a/src/libsyntax/feature_gate/mod.rs
+++ /dev/null
@@ -1,71 +0,0 @@
-//! # 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.
-
-mod accepted;
-mod removed;
-mod active;
-mod builtin_attrs;
-mod check;
-
-use crate::{edition::Edition, symbol::Symbol};
-use std::fmt;
-use std::num::NonZeroU32;
-use syntax_pos::Span;
-
-#[derive(Clone, Copy)]
-pub enum State {
-    Accepted,
-    Active { set: fn(&mut Features, Span) },
-    Removed { reason: Option<&'static str> },
-    Stabilized { reason: Option<&'static str> },
-}
-
-impl fmt::Debug for State {
-    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        match self {
-            State::Accepted { .. } => write!(f, "accepted"),
-            State::Active { .. } => write!(f, "active"),
-            State::Removed { .. } => write!(f, "removed"),
-            State::Stabilized { .. } => write!(f, "stabilized"),
-        }
-    }
-}
-
-#[derive(Debug, Clone)]
-pub struct Feature {
-    state: State,
-    name: Symbol,
-    since: &'static str,
-    issue: Option<u32>,  // FIXME: once #58732 is done make this an Option<NonZeroU32>
-    edition: Option<Edition>,
-    description: &'static str,
-}
-
-impl Feature {
-    fn issue(&self) -> Option<NonZeroU32> {
-        self.issue.and_then(|i| NonZeroU32::new(i))
-    }
-}
-
-pub use active::{Features, INCOMPLETE_FEATURES};
-pub use builtin_attrs::{
-    AttributeGate, AttributeType, GatedCfg,
-    BuiltinAttribute, BUILTIN_ATTRIBUTES, BUILTIN_ATTRIBUTE_MAP,
-    deprecated_attributes, is_builtin_attr,  is_builtin_attr_name,
-};
-pub use check::{
-    check_crate, check_attribute, get_features, feature_err, emit_feature_err,
-    Stability, GateIssue, UnstableFeatures,
-    EXPLAIN_STMT_ATTR_SYNTAX, EXPLAIN_UNSIZED_TUPLE_COERCION,
-};