about summary refs log tree commit diff
path: root/compiler/rustc_ast/src/util/literal.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_ast/src/util/literal.rs')
-rw-r--r--compiler/rustc_ast/src/util/literal.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_ast/src/util/literal.rs b/compiler/rustc_ast/src/util/literal.rs
index 8534011e189..5fa0ea35455 100644
--- a/compiler/rustc_ast/src/util/literal.rs
+++ b/compiler/rustc_ast/src/util/literal.rs
@@ -181,7 +181,7 @@ impl LitKind {
                     }
                 });
                 error?;
-                buf.push(b'\0');
+                buf.push(0);
                 LitKind::CStr(buf.into(), StrStyle::Cooked)
             }
             token::CStrRaw(n) => {
@@ -204,7 +204,7 @@ impl LitKind {
                     }
                 });
                 error?;
-                buf.push(b'\0');
+                buf.push(0);
                 LitKind::CStr(buf.into(), StrStyle::Raw(n))
             }
             token::Err => LitKind::Err,