From dcc4b994b90cff60fb4c98ce858755b718c935ad Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Mon, 29 Jul 2019 02:00:53 +0200 Subject: Turn INCOMPLETE_FEATURES into a lint. --- src/libsyntax/feature_gate.rs | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'src/libsyntax') diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 34e4d7d5a19..2b43baefab7 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -569,10 +569,10 @@ declare_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. -const INCOMPLETE_FEATURES: &[Symbol] = &[ +/// 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. +pub const INCOMPLETE_FEATURES: &[Symbol] = &[ sym::impl_trait_in_bindings, sym::generic_associated_types, sym::const_generics, @@ -2338,15 +2338,6 @@ pub fn get_features(span_handler: &Handler, krate_attrs: &[ast::Attribute], } let name = mi.name_or_empty(); - if INCOMPLETE_FEATURES.iter().any(|f| name == *f) { - span_handler.struct_span_warn( - mi.span(), - &format!( - "the feature `{}` is incomplete and may cause the compiler to crash", - name - ) - ).emit(); - } if let Some(edition) = ALL_EDITIONS.iter().find(|e| name == e.feature_name()) { if *edition <= crate_edition { -- cgit 1.4.1-3-g733a5