From d027cc8ee1d07e93e2a7b959db54099fb1f21edd Mon Sep 17 00:00:00 2001 From: varkor Date: Fri, 3 Aug 2018 21:12:57 +0100 Subject: [PATCH] Change feature edition error into a warning --- src/libsyntax/feature_gate.rs | 2 +- src/test/ui/E0705.rs | 4 +++- src/test/ui/E0705.stderr | 7 ++----- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 0014fd5ae48..193e560893f 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -1956,7 +1956,7 @@ fn feature_removed(span_handler: &Handler, span: Span, reason: Option<&str>) { if let Some((.., set)) = ACTIVE_FEATURES.iter().find(|f| name == f.0) { if let Some(edition) = edition_enabled_features.get(&name) { - struct_span_err!( + struct_span_warn!( span_handler, mi.span, E0705, diff --git a/src/test/ui/E0705.rs b/src/test/ui/E0705.rs index 743c108bb68..a0ce95e3e02 100644 --- a/src/test/ui/E0705.rs +++ b/src/test/ui/E0705.rs @@ -8,9 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// compile-pass + #![feature(rust_2018_preview)] #![feature(raw_identifiers)] -//~^ ERROR the feature `raw_identifiers` is included in the Rust 2018 edition +//~^ WARN the feature `raw_identifiers` is included in the Rust 2018 edition fn main() { let foo = 0; diff --git a/src/test/ui/E0705.stderr b/src/test/ui/E0705.stderr index cab443a2137..ebb8dd4975d 100644 --- a/src/test/ui/E0705.stderr +++ b/src/test/ui/E0705.stderr @@ -1,9 +1,6 @@ -error[E0705]: the feature `raw_identifiers` is included in the Rust 2018 edition - --> $DIR/E0705.rs:12:12 +warning[E0705]: the feature `raw_identifiers` is included in the Rust 2018 edition + --> $DIR/E0705.rs:14:12 | LL | #![feature(raw_identifiers)] | ^^^^^^^^^^^^^^^ -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0705`. -- 2.44.0