@@ -50,34 +50,6 @@ pub struct Feature {
50
50
pub tracking_issue : Option < u32 > ,
51
51
}
52
52
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
-
81
53
pub type Features = HashMap < String , Feature > ;
82
54
83
55
pub fn check ( path : & Path , bad : & mut bool , quiet : bool ) {
@@ -310,13 +282,12 @@ fn get_and_check_lib_features(base_src_path: &Path,
310
282
Ok ( ( name, f) ) => {
311
283
let mut check_features = |f : & Feature , list : & Features , display : & str | {
312
284
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 {
314
286
tidy_error ! ( bad,
315
- "{}:{}: mismatches to {} in: {:? }" ,
287
+ "{}:{}: mismatches the `issue` in { }" ,
316
288
file. display( ) ,
317
289
line,
318
- display,
319
- & m) ;
290
+ display) ;
320
291
}
321
292
}
322
293
} ;
0 commit comments