File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -667,15 +667,15 @@ impl String {
667
667
/// This is highly unsafe, due to the number of invariants that aren't
668
668
/// checked:
669
669
///
670
- /// * The memory at `ptr ` needs to have been previously allocated by the
670
+ /// * The memory at `buf ` needs to have been previously allocated by the
671
671
/// same allocator the standard library uses, with a required alignment of exactly 1.
672
672
/// * `length` needs to be less than or equal to `capacity`.
673
673
/// * `capacity` needs to be the correct value.
674
674
///
675
675
/// Violating these may cause problems like corrupting the allocator's
676
676
/// internal data structures.
677
677
///
678
- /// The ownership of `ptr ` is effectively transferred to the
678
+ /// The ownership of `buf ` is effectively transferred to the
679
679
/// `String` which may then deallocate, reallocate or change the
680
680
/// contents of memory pointed to by the pointer at will. Ensure
681
681
/// that nothing else uses the pointer after calling this
You can’t perform that action at this time.
0 commit comments