We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5d07a70 + 9788c41 commit a438bdcCopy full SHA for a438bdc
src/libcore/repr.rs
@@ -286,7 +286,13 @@ impl ReprVisitor : TyVisitor {
286
fn visit_f32() -> bool { self.write::<f32>() }
287
fn visit_f64() -> bool { self.write::<f64>() }
288
289
- fn visit_char() -> bool { self.write::<u32>() }
+ fn visit_char() -> bool {
290
+ do self.get::<char> |&ch| {
291
+ self.writer.write_char('\'');
292
+ self.writer.write_escaped_char(ch);
293
294
+ }
295
296
297
// Type no longer exists, vestigial function.
298
fn visit_str() -> bool { fail; }
0 commit comments