Skip to content

Commit 7b07730

Browse files
committed
Fix ast_pretty for format_args for {:x?} and {:X?}.
They were accidentally swapped.
1 parent 9f2ba59 commit 7b07730

File tree

1 file changed

+2
-2
lines changed
  • compiler/rustc_ast_pretty/src/pprust/state

1 file changed

+2
-2
lines changed

compiler/rustc_ast_pretty/src/pprust/state/expr.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -708,10 +708,10 @@ pub fn reconstruct_format_args_template_string(pieces: &[FormatArgsPiece]) -> St
708708
}
709709
}
710710
if flags >> (rustc_parse_format::FlagDebugLowerHex as usize) & 1 != 0 {
711-
template.push('X');
711+
template.push('x');
712712
}
713713
if flags >> (rustc_parse_format::FlagDebugUpperHex as usize) & 1 != 0 {
714-
template.push('x');
714+
template.push('X');
715715
}
716716
template.push_str(match p.format_trait {
717717
FormatTrait::Display => "",

0 commit comments

Comments
 (0)