Skip to content

Commit 6795ddf

Browse files
committed
Don't require gate tests for removed features
1 parent 0bcd3b2 commit 6795ddf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/tools/tidy/src/features.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
//! * The set of library features is disjoint from the set of language features
1717
//! * Library features have at most one stability level
1818
//! * 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
2020
2121
use std::collections::HashMap;
2222
use std::fmt;
@@ -27,6 +27,7 @@ use std::path::Path;
2727
#[derive(PartialEq)]
2828
enum Status {
2929
Stable,
30+
Removed,
3031
Unstable,
3132
}
3233

@@ -35,6 +36,7 @@ impl fmt::Display for Status {
3536
let as_str = match *self {
3637
Status::Stable => "stable",
3738
Status::Unstable => "unstable",
39+
Status::Removed => "removed",
3840
};
3941
fmt::Display::fmt(as_str, f)
4042
}
@@ -221,7 +223,7 @@ fn collect_lang_features(path: &Path) -> HashMap<String, Feature> {
221223
let mut parts = line.trim().split(",");
222224
let level = match parts.next().map(|l| l.trim().trim_left_matches('(')) {
223225
Some("active") => Status::Unstable,
224-
Some("removed") => Status::Unstable,
226+
Some("removed") => Status::Removed,
225227
Some("accepted") => Status::Stable,
226228
_ => return None,
227229
};

0 commit comments

Comments
 (0)