Skip to content

Commit 0284550

Browse files
authored
Rollup merge of rust-lang#45671 - est31:master, r=alexcrichton
Tidy: track rustc_const_unstable feature gates as well This is important for the unstable book stub generation.
2 parents e2554b3 + 6a16a7c commit 0284550

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/tools/tidy/src/features.rs

+20
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,26 @@ fn map_lib_features(base_src_path: &Path,
351351
}
352352
}
353353
becoming_feature = None;
354+
if line.contains("rustc_const_unstable(") {
355+
// const fn features are handled specially
356+
let feature_name = match find_attr_val(line, "feature") {
357+
Some(name) => name,
358+
None => err!("malformed stability attribute"),
359+
};
360+
let feature = Feature {
361+
level: Status::Unstable,
362+
since: "None".to_owned(),
363+
has_gate_test: false,
364+
// Whether there is a common tracking issue
365+
// for these feature gates remains an open question
366+
// https://github.com/rust-lang/rust/issues/24111#issuecomment-340283184
367+
// But we take 24111 otherwise they will be shown as
368+
// "internal to the compiler" which they are not.
369+
tracking_issue: Some(24111),
370+
};
371+
mf(Ok((feature_name, feature)), file, i + 1);
372+
continue;
373+
}
354374
let level = if line.contains("[unstable(") {
355375
Status::Unstable
356376
} else if line.contains("[stable(") {

0 commit comments

Comments
 (0)