Skip to content

Commit d027cc8

Browse files
committed
Change feature edition error into a warning
1 parent c157ec8 commit d027cc8

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

src/libsyntax/feature_gate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1956,7 +1956,7 @@ pub fn get_features(span_handler: &Handler, krate_attrs: &[ast::Attribute],
19561956

19571957
if let Some((.., set)) = ACTIVE_FEATURES.iter().find(|f| name == f.0) {
19581958
if let Some(edition) = edition_enabled_features.get(&name) {
1959-
struct_span_err!(
1959+
struct_span_warn!(
19601960
span_handler,
19611961
mi.span,
19621962
E0705,

src/test/ui/E0705.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// compile-pass
12+
1113
#![feature(rust_2018_preview)]
1214
#![feature(raw_identifiers)]
13-
//~^ ERROR the feature `raw_identifiers` is included in the Rust 2018 edition
15+
//~^ WARN the feature `raw_identifiers` is included in the Rust 2018 edition
1416

1517
fn main() {
1618
let foo = 0;

src/test/ui/E0705.stderr

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
error[E0705]: the feature `raw_identifiers` is included in the Rust 2018 edition
2-
--> $DIR/E0705.rs:12:12
1+
warning[E0705]: the feature `raw_identifiers` is included in the Rust 2018 edition
2+
--> $DIR/E0705.rs:14:12
33
|
44
LL | #![feature(raw_identifiers)]
55
| ^^^^^^^^^^^^^^^
66

7-
error: aborting due to previous error
8-
9-
For more information about this error, try `rustc --explain E0705`.

0 commit comments

Comments
 (0)