Skip to content

Feature gate clean #32791

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

Merged
merged 5 commits into from
Apr 28, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix tidy for the new syntax of feature declarations in libsyntax.
  • Loading branch information
LeoTestard committed Apr 21, 2016
commit 11f1eb0c4e2ff7e43052b4b847fb4dffaeea46b7
14 changes: 7 additions & 7 deletions src/tools/tidy/src/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,18 +136,18 @@ fn collect_lang_features(path: &Path) -> Vec<Feature> {

let mut features = Vec::new();
for line in contents.lines().map(|l| l.trim()) {
if !STATUSES.iter().any(|s| line.contains(s) && line.starts_with("(")) {
if !STATUSES.iter().any(|s| line.starts_with(&format!("({}", s))) {
continue
}
let mut parts = line.split(",");
let name = parts.next().unwrap().replace("\"", "").replace("(", "");
let since = parts.next().unwrap().trim().replace("\"", "");
let status = match parts.skip(1).next().unwrap() {
s if s.contains("Active") => "unstable",
s if s.contains("Removed") => "unstable",
s if s.contains("Accepted") => "stable",
let status = match &parts.next().unwrap().trim().replace("(", "")[..] {
"active" => "unstable",
"removed" => "unstable",
"accepted" => "stable",
s => panic!("unknown status: {}", s),
};
let name = parts.next().unwrap().trim().to_owned();
let since = parts.next().unwrap().trim().replace("\"", "");

features.push(Feature {
name: name,
Expand Down