fix doctests in libcore
This commit is contained in:
parent
056370167a
commit
60e6629045
|
@ -1833,7 +1833,7 @@ impl<T: ?Sized> *mut T {
|
||||||
///
|
///
|
||||||
/// # #[allow(dead_code)]
|
/// # #[allow(dead_code)]
|
||||||
/// unsafe fn from_buf_raw<T: Copy>(ptr: *const T, elts: usize) -> Vec<T> {
|
/// unsafe fn from_buf_raw<T: Copy>(ptr: *const T, elts: usize) -> Vec<T> {
|
||||||
/// let mut dst = Vec::with_capacity(elts);
|
/// let mut dst: Vec<T> = Vec::with_capacity(elts);
|
||||||
/// dst.set_len(elts);
|
/// dst.set_len(elts);
|
||||||
/// dst.as_mut_ptr().copy_from(ptr, elts);
|
/// dst.as_mut_ptr().copy_from(ptr, elts);
|
||||||
/// dst
|
/// dst
|
||||||
|
@ -1872,7 +1872,7 @@ impl<T: ?Sized> *mut T {
|
||||||
///
|
///
|
||||||
/// # #[allow(dead_code)]
|
/// # #[allow(dead_code)]
|
||||||
/// unsafe fn from_buf_raw<T: Copy>(ptr: *const T, elts: usize) -> Vec<T> {
|
/// unsafe fn from_buf_raw<T: Copy>(ptr: *const T, elts: usize) -> Vec<T> {
|
||||||
/// let mut dst = Vec::with_capacity(elts);
|
/// let mut dst: Vec<T> = Vec::with_capacity(elts);
|
||||||
/// dst.set_len(elts);
|
/// dst.set_len(elts);
|
||||||
/// dst.as_mut_ptr().copy_from_nonoverlapping(ptr, elts);
|
/// dst.as_mut_ptr().copy_from_nonoverlapping(ptr, elts);
|
||||||
/// dst
|
/// dst
|
||||||
|
|
Loading…
Reference in New Issue