@@ -20,7 +20,7 @@ use regex::{Regex, escape};
20
20
mod version;
21
21
use self :: version:: Version ;
22
22
23
- const FEATURE_GROUP_START_PREFIX : & str = "// feature-group-start: " ;
23
+ const FEATURE_GROUP_START_PREFIX : & str = "// feature-group-start" ;
24
24
const FEATURE_GROUP_END_PREFIX : & str = "// feature-group-end" ;
25
25
26
26
#[ derive( Debug , PartialEq , Clone ) ]
@@ -194,7 +194,7 @@ pub fn collect_lang_features(base_src_path: &Path, bad: &mut bool) -> Features {
194
194
// without one inside `// no tracking issue START` and `// no tracking issue END`.
195
195
let mut next_feature_omits_tracking_issue = false ;
196
196
197
- let mut next_feature_group = None ;
197
+ let mut in_feature_group = false ;
198
198
let mut prev_since = None ;
199
199
200
200
contents. lines ( ) . zip ( 1 ..)
@@ -215,7 +215,7 @@ pub fn collect_lang_features(base_src_path: &Path, bad: &mut bool) -> Features {
215
215
}
216
216
217
217
if line. starts_with ( FEATURE_GROUP_START_PREFIX ) {
218
- if next_feature_group . is_some ( ) {
218
+ if in_feature_group {
219
219
tidy_error ! (
220
220
bad,
221
221
// ignore-tidy-linelength
@@ -224,12 +224,11 @@ pub fn collect_lang_features(base_src_path: &Path, bad: &mut bool) -> Features {
224
224
) ;
225
225
}
226
226
227
- let group = line. trim_start_matches ( FEATURE_GROUP_START_PREFIX ) . trim ( ) ;
228
- next_feature_group = Some ( group. to_owned ( ) ) ;
227
+ in_feature_group = true ;
229
228
prev_since = None ;
230
229
return None ;
231
230
} else if line. starts_with ( FEATURE_GROUP_END_PREFIX ) {
232
- next_feature_group = None ;
231
+ in_feature_group = false ;
233
232
prev_since = None ;
234
233
return None ;
235
234
}
@@ -257,7 +256,7 @@ pub fn collect_lang_features(base_src_path: &Path, bad: &mut bool) -> Features {
257
256
None
258
257
}
259
258
} ;
260
- if next_feature_group . is_some ( ) {
259
+ if in_feature_group {
261
260
if prev_since > since {
262
261
tidy_error ! (
263
262
bad,
0 commit comments