]> git.lizzy.rs Git - rust.git/commit
rustc: Allow an edition's feature on that edition
authorAlex Crichton <alex@alexcrichton.com>
Fri, 11 May 2018 16:14:23 +0000 (09:14 -0700)
committerMark Simulacrum <mark.simulacrum@gmail.com>
Sat, 12 May 2018 14:39:05 +0000 (08:39 -0600)
commit28856327066b9d15662ffd185196366de02c6240
treea2077ad7810b6b808767e04c9195e1974288d3ea
parentbd441779ff60668d29b857e3b85e77aac773ebd3
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 #50662
src/libsyntax/feature_gate.rs
src/test/compile-fail/edition-feature-ok.rs [new file with mode: 0644]