about summary refs log tree commit diff
path: root/library/std/src/sys/windows/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-12-14 11:14:03 +0000
committerbors <bors@rust-lang.org>2023-12-14 11:14:03 +0000
commit1aa6aefdc92555b3fbc5ae4c99365df9845a3e31 (patch)
tree6f484d11a31b271f1e06739754ba4159521da813 /library/std/src/sys/windows/mod.rs
parent9d49eb76c47a139ef71da4ab56aa9aeca5f24913 (diff)
parentc0134887d2b4cbac421babcd40710cc9b755f931 (diff)
downloadrust-1aa6aefdc92555b3fbc5ae4c99365df9845a3e31.tar.gz
rust-1aa6aefdc92555b3fbc5ae4c99365df9845a3e31.zip
Auto merge of #118566 - klensy:cstr-new, r=WaffleLapkin
use c literals in compiler and library

Relands refreshed https://github.com/rust-lang/rust/pull/111647
Diffstat (limited to 'library/std/src/sys/windows/mod.rs')
-rw-r--r--library/std/src/sys/windows/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/sys/windows/mod.rs b/library/std/src/sys/windows/mod.rs
index 9c83d6eb8bf..8b722f01a5d 100644
--- a/library/std/src/sys/windows/mod.rs
+++ b/library/std/src/sys/windows/mod.rs
@@ -1,6 +1,6 @@
 #![allow(missing_docs, nonstandard_style)]
 
-use crate::ffi::{CStr, OsStr, OsString};
+use crate::ffi::{OsStr, OsString};
 use crate::io::ErrorKind;
 use crate::mem::MaybeUninit;
 use crate::os::windows::ffi::{OsStrExt, OsStringExt};
@@ -63,7 +63,7 @@ pub unsafe fn init(_argc: isize, _argv: *const *const u8, _sigpipe: u8) {
 
     // Normally, `thread::spawn` will call `Thread::set_name` but since this thread already
     // exists, we have to call it ourselves.
-    thread::Thread::set_name(CStr::from_bytes_with_nul_unchecked(b"main\0"));
+    thread::Thread::set_name(&c"main");
 }
 
 // SAFETY: must be called only once during runtime cleanup.