Skip to content

Commit 60e6629

Browse files
committed
fix doctests in libcore
1 parent 0563701 commit 60e6629

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcore/ptr.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1833,7 +1833,7 @@ impl<T: ?Sized> *mut T {
18331833
///
18341834
/// # #[allow(dead_code)]
18351835
/// unsafe fn from_buf_raw<T: Copy>(ptr: *const T, elts: usize) -> Vec<T> {
1836-
/// let mut dst = Vec::with_capacity(elts);
1836+
/// let mut dst: Vec<T> = Vec::with_capacity(elts);
18371837
/// dst.set_len(elts);
18381838
/// dst.as_mut_ptr().copy_from(ptr, elts);
18391839
/// dst
@@ -1872,7 +1872,7 @@ impl<T: ?Sized> *mut T {
18721872
///
18731873
/// # #[allow(dead_code)]
18741874
/// unsafe fn from_buf_raw<T: Copy>(ptr: *const T, elts: usize) -> Vec<T> {
1875-
/// let mut dst = Vec::with_capacity(elts);
1875+
/// let mut dst: Vec<T> = Vec::with_capacity(elts);
18761876
/// dst.set_len(elts);
18771877
/// dst.as_mut_ptr().copy_from_nonoverlapping(ptr, elts);
18781878
/// dst

0 commit comments

Comments
 (0)