Skip to content

Commit

Permalink
Rollup merge of rust-lang#45671 - est31:master, r=alexcrichton
Browse files Browse the repository at this point in the history
Tidy: track rustc_const_unstable feature gates as well

This is important for the unstable book stub generation.
  • Loading branch information
kennytm authored Nov 1, 2017
2 parents e2554b3 + 6a16a7c commit 0284550
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/tools/tidy/src/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,26 @@ fn map_lib_features(base_src_path: &Path,
}
}
becoming_feature = None;
if line.contains("rustc_const_unstable(") {
// const fn features are handled specially
let feature_name = match find_attr_val(line, "feature") {
Some(name) => name,
None => err!("malformed stability attribute"),
};
let feature = Feature {
level: Status::Unstable,
since: "None".to_owned(),
has_gate_test: false,
// Whether there is a common tracking issue
// for these feature gates remains an open question
// https://github.com/rust-lang/rust/issues/24111#issuecomment-340283184
// But we take 24111 otherwise they will be shown as
// "internal to the compiler" which they are not.
tracking_issue: Some(24111),
};
mf(Ok((feature_name, feature)), file, i + 1);
continue;
}
let level = if line.contains("[unstable(") {
Status::Unstable
} else if line.contains("[stable(") {
Expand Down

0 comments on commit 0284550

Please sign in to comment.