about summary refs log tree commit diff
path: root/compiler/rustc_builtin_macros/src/concat_bytes.rs
diff options
context:
space:
mode:
authorJohn Millikin <john@john-millikin.com>2023-11-01 09:16:34 +0900
committerJohn Millikin <john@john-millikin.com>2023-11-01 09:16:34 +0900
commit0f41bc21b958fed66b3d055531af67638390f520 (patch)
tree259b3b8f069e1472eabaca8243880b31213cd7d9 /compiler/rustc_builtin_macros/src/concat_bytes.rs
parenta395214a3a88be976eec9256987d5eb6b3584bdc (diff)
downloadrust-0f41bc21b958fed66b3d055531af67638390f520.tar.gz
rust-0f41bc21b958fed66b3d055531af67638390f520.zip
Stabilize C string literals
Diffstat (limited to 'compiler/rustc_builtin_macros/src/concat_bytes.rs')
-rw-r--r--compiler/rustc_builtin_macros/src/concat_bytes.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_builtin_macros/src/concat_bytes.rs b/compiler/rustc_builtin_macros/src/concat_bytes.rs
index c4f5af384c1..f1b45330ba6 100644
--- a/compiler/rustc_builtin_macros/src/concat_bytes.rs
+++ b/compiler/rustc_builtin_macros/src/concat_bytes.rs
@@ -19,8 +19,8 @@ fn invalid_type_err(
     let snippet = cx.sess.source_map().span_to_snippet(span).ok();
     match ast::LitKind::from_token_lit(token_lit) {
         Ok(ast::LitKind::CStr(_, _)) => {
-            // FIXME(c_str_literals): should concatenation of C string literals
-            // include the null bytes in the end?
+            // Avoid ambiguity in handling of terminal `NUL` by refusing to
+            // concatenate C string literals as bytes.
             cx.emit_err(errors::ConcatCStrLit { span: span });
         }
         Ok(ast::LitKind::Char(_)) => {