Print const chars escaped with surrounding quotes
This commit is contained in:
parent
5713677862
commit
9d82107f16
|
@ -1564,7 +1564,7 @@ define_print_and_forward_display! {
|
|||
p!(write("{}{}", sign_extend(bits, size) as i128, i))
|
||||
},
|
||||
(ConstValue::Scalar(Scalar::Bits { bits, ..}), ty::Char)
|
||||
=> p!(write("{}", ::std::char::from_u32(bits as u32).unwrap())),
|
||||
=> p!(write("{:?}", ::std::char::from_u32(bits as u32).unwrap())),
|
||||
(_, ty::FnDef(did, _)) => p!(write("{}", cx.tcx().def_path_str(*did))),
|
||||
(
|
||||
ConstValue::Slice(place, len),
|
||||
|
|
Loading…
Reference in New Issue