@@ -373,8 +373,7 @@ mod desc {
373
373
pub const parse_opt_comma_list: & str = parse_comma_list;
374
374
pub const parse_number: & str = "a number" ;
375
375
pub const parse_opt_number: & str = parse_number;
376
- pub const parse_frame_pointer: & str =
377
- "one of `true`/`yes`/`on`, `false`/`no`/`off`, or (with -Zunstable-options) `non-leaf`" ;
376
+ pub const parse_frame_pointer: & str = "one of `true`/`yes`/`on`, `false`/`no`/`off`, or (with -Zunstable-options) `non-leaf` or `always`" ;
378
377
pub const parse_threads: & str = parse_number;
379
378
pub const parse_time_passes_format: & str = "`text` (default) or `json`" ;
380
379
pub const parse_passes: & str = "a space-separated list of passes, or `all`" ;
@@ -674,15 +673,15 @@ mod parse {
674
673
}
675
674
676
675
pub ( crate ) fn parse_frame_pointer ( slot : & mut FramePointer , v : Option < & str > ) -> bool {
677
- let mut boolish = false ;
678
- let mut is_parsed = parse_bool ( & mut boolish , v ) ;
679
- if boolish & is_parsed {
680
- * slot = FramePointer :: Always ;
681
- } else if v == Some ( "non-leaf " ) {
682
- is_parsed = true ;
683
- * slot = FramePointer :: NonLeaf ;
676
+ let mut yes = false ;
677
+ match v {
678
+ Some ( _ ) if parse_bool ( & mut yes , v ) && yes => slot . ratchet ( FramePointer :: Always ) ,
679
+ Some ( _ ) if parse_bool ( & mut yes , v ) => slot . ratchet ( FramePointer :: MayOmit ) ,
680
+ Some ( "always " ) => slot . ratchet ( FramePointer :: Always ) ,
681
+ Some ( "non-leaf" ) => slot . ratchet ( FramePointer :: NonLeaf ) ,
682
+ _ => return false ,
684
683
} ;
685
- is_parsed
684
+ true
686
685
}
687
686
688
687
pub ( crate ) fn parse_passes ( slot : & mut Passes , v : Option < & str > ) -> bool {
0 commit comments