diff options
| author | varkor <github@varkor.com> | 2018-08-03 21:12:57 +0100 |
|---|---|---|
| committer | varkor <github@varkor.com> | 2018-08-05 15:54:49 +0100 |
| commit | d027cc8ee1d07e93e2a7b959db54099fb1f21edd (patch) | |
| tree | 63602e6e53ff59261772f8bf90f06b7769c92f2b | |
| parent | c157ec87ed0c565e98c2887a361c1d7517949e1f (diff) | |
| download | rust-d027cc8ee1d07e93e2a7b959db54099fb1f21edd.tar.gz rust-d027cc8ee1d07e93e2a7b959db54099fb1f21edd.zip | |
Change feature edition error into a warning
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/E0705.rs | 4 | ||||
| -rw-r--r-- | 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 @@ pub fn get_features(span_handler: &Handler, krate_attrs: &[ast::Attribute], 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`. |
