@@ -469,28 +469,28 @@ impl LangString {
469
469
) ;
470
470
471
471
for token in tokens {
472
- match token {
472
+ match token. trim ( ) {
473
473
"" => { } ,
474
474
"should_panic" => {
475
475
data. should_panic = true ;
476
476
seen_rust_tags = seen_other_tags == false ;
477
477
}
478
- "no_run" => { data. no_run = true ; seen_rust_tags = seen_other_tags == false ; }
479
- "ignore" => { data. ignore = true ; seen_rust_tags = seen_other_tags == false ; }
478
+ "no_run" => { data. no_run = true ; seen_rust_tags = ! seen_other_tags; }
479
+ "ignore" => { data. ignore = true ; seen_rust_tags = ! seen_other_tags; }
480
480
"rust" => { data. rust = true ; seen_rust_tags = true ; }
481
481
"test_harness" => {
482
482
data. test_harness = true ;
483
- seen_rust_tags = seen_other_tags == false || seen_rust_tags == true ;
483
+ seen_rust_tags = ! seen_other_tags || seen_rust_tags;
484
484
}
485
485
"compile_fail" if allow_compile_fail => {
486
486
data. compile_fail = true ;
487
- seen_rust_tags = seen_other_tags == false || seen_rust_tags == true ;
487
+ seen_rust_tags = ! seen_other_tags || seen_rust_tags;
488
488
data. no_run = true ;
489
489
}
490
490
x if allow_error_code_check && x. starts_with ( "E" ) && x. len ( ) == 5 => {
491
491
if let Ok ( _) = x[ 1 ..] . parse :: < u32 > ( ) {
492
492
data. error_codes . push ( x. to_owned ( ) ) ;
493
- seen_rust_tags = seen_other_tags == false || seen_rust_tags == true ;
493
+ seen_rust_tags = ! seen_other_tags || seen_rust_tags;
494
494
} else {
495
495
seen_other_tags = true ;
496
496
}
@@ -680,6 +680,7 @@ mod tests {
680
680
t ( "{.example .rust}" , false , false , false , true , false , false , Vec :: new ( ) ) ;
681
681
t ( "{.test_harness .rust}" , false , false , false , true , true , false , Vec :: new ( ) ) ;
682
682
t ( "text, no_run" , false , true , false , false , false , false , Vec :: new ( ) ) ;
683
+ t ( "text,no_run" , false , true , false , false , false , false , Vec :: new ( ) ) ;
683
684
}
684
685
685
686
#[ test]
0 commit comments