diff options
| author | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2019-04-15 11:00:55 +0200 |
|---|---|---|
| committer | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2019-05-25 10:07:01 +0200 |
| commit | 669bc7788667db2fc113e4ba2ab3bdc2119665f6 (patch) | |
| tree | af1618f697861ea38b11b21f97b9f3f7297f1684 | |
| parent | 9b5896ade3ae279a2d91773b3ae0b097657b8b6e (diff) | |
| download | rust-669bc7788667db2fc113e4ba2ab3bdc2119665f6.tar.gz rust-669bc7788667db2fc113e4ba2ab3bdc2119665f6.zip | |
`u8` is printed as a number, not a character
| -rw-r--r-- | src/librustc/ty/print/pretty.rs | 4 | ||||
| -rw-r--r-- | src/test/mir-opt/byte_slice.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc/ty/print/pretty.rs b/src/librustc/ty/print/pretty.rs index 10038603f30..95b1519023f 100644 --- a/src/librustc/ty/print/pretty.rs +++ b/src/librustc/ty/print/pretty.rs @@ -1578,7 +1578,7 @@ define_print_and_forward_display! { p!(write("b\"")); for &c in slice { for e in std::ascii::escape_default(c) { - p!(write("{}", e)); + p!(write("{}", e as char)); } } p!(write("\"")); @@ -1594,7 +1594,7 @@ define_print_and_forward_display! { p!(write("b\"")); for &c in slice { for e in std::ascii::escape_default(c) { - p!(write("{}", e)); + p!(write("{}", e as char)); } } p!(write("\"")); diff --git a/src/test/mir-opt/byte_slice.rs b/src/test/mir-opt/byte_slice.rs index 23faf7e16a7..7edfa3e1124 100644 --- a/src/test/mir-opt/byte_slice.rs +++ b/src/test/mir-opt/byte_slice.rs @@ -8,7 +8,7 @@ fn main() { // END RUST SOURCE // START rustc.main.EraseRegions.after.mir // ... -// _1 = const b"102111111"; +// _1 = const b"foo"; // ... // _2 = [const 5u8, const 120u8]; // ... |
