]> git.proxmox.com Git - rustc.git/blobdiff - src/liballoc/str.rs
New upstream version 1.46.0~beta.2+dfsg1
[rustc.git] / src / liballoc / str.rs
index 70860c09a2c31d0b031b753253265b667e391311..57927c688479b5f72746d6220b271f58dd2c7e41 100644 (file)
@@ -583,5 +583,5 @@ impl str {
 #[stable(feature = "str_box_extras", since = "1.20.0")]
 #[inline]
 pub unsafe fn from_boxed_utf8_unchecked(v: Box<[u8]>) -> Box<str> {
-    Box::from_raw(Box::into_raw(v) as *mut str)
+    unsafe { Box::from_raw(Box::into_raw(v) as *mut str) }
 }