Skip to content

Commit bd66cbb

Browse files
committed
Remove obsolete tests in tidy
These have been replaced by more reliable checks in the compiler itself.
1 parent af77c42 commit bd66cbb

File tree

1 file changed

+3
-32
lines changed

1 file changed

+3
-32
lines changed

src/tools/tidy/src/features.rs

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -50,34 +50,6 @@ pub struct Feature {
5050
pub tracking_issue: Option<u32>,
5151
}
5252

53-
impl Feature {
54-
fn check_match(&self, other: &Feature)-> Result<(), Vec<&'static str>> {
55-
let mut mismatches = Vec::new();
56-
if self.level != other.level {
57-
mismatches.push("stability level");
58-
}
59-
if self.level == Status::Stable || other.level == Status::Stable {
60-
// As long as a feature is unstable, the since field tracks
61-
// when the given part of the feature has been implemented.
62-
// Mismatches are tolerable as features evolve and functionality
63-
// gets added.
64-
// Once a feature is stable, the since field tracks the first version
65-
// it was part of the stable distribution, and mismatches are disallowed.
66-
if self.since != other.since {
67-
mismatches.push("since");
68-
}
69-
}
70-
if self.tracking_issue != other.tracking_issue {
71-
mismatches.push("tracking issue");
72-
}
73-
if mismatches.is_empty() {
74-
Ok(())
75-
} else {
76-
Err(mismatches)
77-
}
78-
}
79-
}
80-
8153
pub type Features = HashMap<String, Feature>;
8254

8355
pub fn check(path: &Path, bad: &mut bool, quiet: bool) {
@@ -310,13 +282,12 @@ fn get_and_check_lib_features(base_src_path: &Path,
310282
Ok((name, f)) => {
311283
let mut check_features = |f: &Feature, list: &Features, display: &str| {
312284
if let Some(ref s) = list.get(name) {
313-
if let Err(m) = (&f).check_match(s) {
285+
if f.tracking_issue != s.tracking_issue {
314286
tidy_error!(bad,
315-
"{}:{}: mismatches to {} in: {:?}",
287+
"{}:{}: mismatches the `issue` in {}",
316288
file.display(),
317289
line,
318-
display,
319-
&m);
290+
display);
320291
}
321292
}
322293
};

0 commit comments

Comments
 (0)