Make incomplete features part of delcaration

This prevents mistakes where the feature is in the list of incomplete
features but not actually a feature by making the incompleteness a part
of the declaration.
This commit is contained in:
Smitty 2021-06-28 14:39:20 -04:00
parent 1abb5bc992
commit 11ebd80fe7
6 changed files with 40 additions and 56 deletions

View file

@ -1,2 +0,0 @@
#![feature(rustc_insignificant_dtor)] //~ ERROR unknown feature `rustc_insignificant_dtor`
fn main() {}

View file

@ -1,9 +0,0 @@
error[E0635]: unknown feature `rustc_insignificant_dtor`
--> $DIR/rustc_insignificant_dtor.rs:1:12
|
LL | #![feature(rustc_insignificant_dtor)]
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0635`.

View file

@ -301,6 +301,7 @@ fn collect_lang_features_in(base: &Path, file: &str, bad: &mut bool) -> Features
let mut parts = line.split(',');
let level = match parts.next().map(|l| l.trim().trim_start_matches('(')) {
Some("active") => Status::Unstable,
Some("incomplete") => Status::Unstable,
Some("removed") => Status::Removed,
Some("accepted") => Status::Stable,
_ => return None,