Fix ast_pretty for format_args for {:x?} and {:X?}.

They were accidentally swapped.
This commit is contained in:
Mara Bos 2023-01-14 14:16:26 +01:00
parent 9f2ba59647
commit 7b077307fd
1 changed files with 2 additions and 2 deletions

View File

@ -708,10 +708,10 @@ pub fn reconstruct_format_args_template_string(pieces: &[FormatArgsPiece]) -> St
}
}
if flags >> (rustc_parse_format::FlagDebugLowerHex as usize) & 1 != 0 {
template.push('X');
template.push('x');
}
if flags >> (rustc_parse_format::FlagDebugUpperHex as usize) & 1 != 0 {
template.push('x');
template.push('X');
}
template.push_str(match p.format_trait {
FormatTrait::Display => "",