diff options
| author | kennytm <kennytm@gmail.com> | 2017-11-01 13:32:21 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-01 13:32:21 +0800 |
| commit | 028455082e3e478ca01780862b324838a60c85fc (patch) | |
| tree | 250f7982728b17e90be05336ed3550a58ad87c48 | |
| parent | e2554b36fc805c5dcb8bef65fee12e0753d5ad03 (diff) | |
| parent | 6a16a7c05b2fc65e28f87f1859323b4be6d5f95f (diff) | |
| download | rust-028455082e3e478ca01780862b324838a60c85fc.tar.gz rust-028455082e3e478ca01780862b324838a60c85fc.zip | |
Rollup merge of #45671 - est31:master, r=alexcrichton
Tidy: track rustc_const_unstable feature gates as well This is important for the unstable book stub generation.
| -rw-r--r-- | src/tools/tidy/src/features.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/tools/tidy/src/features.rs b/src/tools/tidy/src/features.rs index a2a264490a1..9736c039930 100644 --- a/src/tools/tidy/src/features.rs +++ b/src/tools/tidy/src/features.rs @@ -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(") { |
