Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#![feature(rust_2018_preview)] is an error in the 2018 edition #50662

Closed
alexcrichton opened this issue May 11, 2018 · 0 comments · Fixed by #50663
Closed

#![feature(rust_2018_preview)] is an error in the 2018 edition #50662

alexcrichton opened this issue May 11, 2018 · 0 comments · Fixed by #50663
Assignees
Labels
A-rust-2018-preview Area: The 2018 edition preview

Comments

@alexcrichton
Copy link
Member

This makes for relatively bad ergonomics, we should make this code a warning only on the 2018 edition (at most):

#![feature(rust_2018_preview)]

fn main() {
}

compiled with:

$ rustc +nightly foo.rs --edition 2018
error[E0557]: feature has been removed
 --> foo.rs:1:12
  |
1 | #![feature(rust_2018_preview)]
  |            ^^^^^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0557`.
alexcrichton added a commit to alexcrichton/rust that referenced this issue May 11, 2018
This commit fixes a hard error where the `#![feature(rust_2018_preview)]`
feature was forbidden to be mentioned when the `--edition 2018` flag was passed.
This instead silently accepts that feature gate despite it not being necessary.
It's intended that this will help ease the transition into the 2018 edition as
users will, for the time being, start off with the `rust_2018_preview` feature
and no longer immediately need to remove it.

Closes rust-lang#50662
alexcrichton added a commit to alexcrichton/rust that referenced this issue May 11, 2018
…nishearth

rustc: Allow an edition's feature on that edition

This commit fixes a hard error where the `#![feature(rust_2018_preview)]`
feature was forbidden to be mentioned when the `--edition 2018` flag was passed.
This instead silently accepts that feature gate despite it not being necessary.
It's intended that this will help ease the transition into the 2018 edition as
users will, for the time being, start off with the `rust_2018_preview` feature
and no longer immediately need to remove it.

Closes rust-lang#50662
@alexcrichton alexcrichton added the A-rust-2018-preview Area: The 2018 edition preview label May 11, 2018
@alexcrichton alexcrichton self-assigned this May 11, 2018
@bors bors closed this as completed in 2885632 May 12, 2018
kennytm added a commit to kennytm/rust that referenced this issue May 13, 2018
…nishearth

rustc: Allow an edition's feature on that edition

This commit fixes a hard error where the `#![feature(rust_2018_preview)]`
feature was forbidden to be mentioned when the `--edition 2018` flag was passed.
This instead silently accepts that feature gate despite it not being necessary.
It's intended that this will help ease the transition into the 2018 edition as
users will, for the time being, start off with the `rust_2018_preview` feature
and no longer immediately need to remove it.

Closes rust-lang#50662
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rust-2018-preview Area: The 2018 edition preview
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant