Change feature edition error into a warning
This commit is contained in:
parent
c157ec87ed
commit
d027cc8ee1
3 changed files with 6 additions and 7 deletions
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue