Skip to content

Commit 9d82107

Browse files
committed
Print const chars escaped with surrounding quotes
1 parent 5713677 commit 9d82107

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc/ty/print/pretty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1564,7 +1564,7 @@ define_print_and_forward_display! {
15641564
p!(write("{}{}", sign_extend(bits, size) as i128, i))
15651565
},
15661566
(ConstValue::Scalar(Scalar::Bits { bits, ..}), ty::Char)
1567-
=> p!(write("{}", ::std::char::from_u32(bits as u32).unwrap())),
1567+
=> p!(write("{:?}", ::std::char::from_u32(bits as u32).unwrap())),
15681568
(_, ty::FnDef(did, _)) => p!(write("{}", cx.tcx().def_path_str(*did))),
15691569
(
15701570
ConstValue::Slice(place, len),

0 commit comments

Comments
 (0)