We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
String::from_raw_parts_in
1 parent 8d9618b commit 48f23d9Copy full SHA for 48f23d9
1 file changed
crates/oxc_allocator/src/string.rs
@@ -212,6 +212,8 @@ impl<'alloc> String<'alloc> {
212
/// * The memory at `ptr` needs to have been previously allocated by the same [`Allocator`].
213
/// * `length` needs to be less than or equal to `capacity`.
214
/// * `capacity` needs to be the correct value.
215
+ /// * The region of memory starting at `ptr` and spanning `length` bytes must contain a valid
216
+ /// UTF-8 string.
217
///
218
/// Violating these may cause problems like corrupting the allocator's internal data structures.
219
@@ -221,7 +223,6 @@ impl<'alloc> String<'alloc> {
221
223
222
224
/// # Examples
225
/// ```
- /// use std::mem;
226
/// use oxc_allocator::{Allocator, String};
227
228
/// let allocator = Allocator::default();
0 commit comments