about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Scherer <github35764891676564198441@oli-obk.de>2019-04-02 14:26:56 +0200
committerOliver Scherer <github35764891676564198441@oli-obk.de>2019-05-25 10:07:01 +0200
commit9d82107f16185987048fdf06dae59efe3cf60924 (patch)
treed2fef6aef4991c0d9f5da29ae8002fdefac3cb91
parent5713677862b716ed65f653ed065128c98e6fcbb6 (diff)
downloadrust-9d82107f16185987048fdf06dae59efe3cf60924.tar.gz
rust-9d82107f16185987048fdf06dae59efe3cf60924.zip
Print const chars escaped with surrounding quotes
-rw-r--r--src/librustc/ty/print/pretty.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc/ty/print/pretty.rs b/src/librustc/ty/print/pretty.rs
index 085a0edc986..ca89346b4b4 100644
--- a/src/librustc/ty/print/pretty.rs
+++ b/src/librustc/ty/print/pretty.rs
@@ -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),