about summary refs log tree commit diff
path: root/library/alloc
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-01-26 06:36:37 +0100
committerGitHub <noreply@github.com>2024-01-26 06:36:37 +0100
commit912877d009d5c7187412698f23f35881d0a64dbe (patch)
tree860f2fba8b9cdbb22a3c1ef722266cbf644ce3f1 /library/alloc
parenta37fa372815d6049605b1fc68b4e603510b79f68 (diff)
parentf94a94227cad840e45b11f5a537748b626737c6c (diff)
downloadrust-912877d009d5c7187412698f23f35881d0a64dbe.tar.gz
rust-912877d009d5c7187412698f23f35881d0a64dbe.zip
Rollup merge of #119466 - Sky9x:str_from_raw_parts, r=dtolnay
Initial implementation of `str::from_raw_parts[_mut]`

ACP (accepted): rust-lang/libs-team#167
Tracking issue: #119206

Thanks to ``@Kixiron`` for previous work on this (#107207)

``@rustbot`` label +T-libs-api -T-libs
r? ``@thomcc``

Closes #107207.
Diffstat (limited to 'library/alloc')
-rw-r--r--library/alloc/src/str.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/alloc/src/str.rs b/library/alloc/src/str.rs
index 38f9f39fbf8..ade114678b7 100644
--- a/library/alloc/src/str.rs
+++ b/library/alloc/src/str.rs
@@ -30,6 +30,8 @@ pub use core::str::SplitAsciiWhitespace;
 pub use core::str::SplitInclusive;
 #[stable(feature = "rust1", since = "1.0.0")]
 pub use core::str::SplitWhitespace;
+#[unstable(feature = "str_from_raw_parts", issue = "119206")]
+pub use core::str::{from_raw_parts, from_raw_parts_mut};
 #[stable(feature = "rust1", since = "1.0.0")]
 pub use core::str::{from_utf8, from_utf8_mut, Bytes, CharIndices, Chars};
 #[stable(feature = "rust1", since = "1.0.0")]