16
16
//! * The set of library features is disjoint from the set of language features
17
17
//! * Library features have at most one stability level
18
18
//! * Library features have at most one `since` value
19
- //! * All stability attributes have tests to ensure they are actually stable/ unstable
19
+ //! * All unstable lang features have tests to ensure they are actually unstable
20
20
21
21
use std:: collections:: HashMap ;
22
22
use std:: fmt;
@@ -27,6 +27,7 @@ use std::path::Path;
27
27
#[ derive( PartialEq ) ]
28
28
enum Status {
29
29
Stable ,
30
+ Removed ,
30
31
Unstable ,
31
32
}
32
33
@@ -35,6 +36,7 @@ impl fmt::Display for Status {
35
36
let as_str = match * self {
36
37
Status :: Stable => "stable" ,
37
38
Status :: Unstable => "unstable" ,
39
+ Status :: Removed => "removed" ,
38
40
} ;
39
41
fmt:: Display :: fmt ( as_str, f)
40
42
}
@@ -221,7 +223,7 @@ fn collect_lang_features(path: &Path) -> HashMap<String, Feature> {
221
223
let mut parts = line. trim ( ) . split ( "," ) ;
222
224
let level = match parts. next ( ) . map ( |l| l. trim ( ) . trim_left_matches ( '(' ) ) {
223
225
Some ( "active" ) => Status :: Unstable ,
224
- Some ( "removed" ) => Status :: Unstable ,
226
+ Some ( "removed" ) => Status :: Removed ,
225
227
Some ( "accepted" ) => Status :: Stable ,
226
228
_ => return None ,
227
229
} ;
0 commit comments