Skip to content

Commit

Permalink
fix doctests in libcore
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeyhew committed Dec 23, 2017
1 parent 0563701 commit 60e6629
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libcore/ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1833,7 +1833,7 @@ impl<T: ?Sized> *mut T {
///
/// # #[allow(dead_code)]
/// 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.as_mut_ptr().copy_from(ptr, elts);
/// dst
Expand Down Expand Up @@ -1872,7 +1872,7 @@ impl<T: ?Sized> *mut T {
///
/// # #[allow(dead_code)]
/// 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.as_mut_ptr().copy_from_nonoverlapping(ptr, elts);
/// dst
Expand Down

0 comments on commit 60e6629

Please sign in to comment.