4444
4545use marker:: Sized ;
4646
47+ #[ cfg( stage0) ] pub use self :: copy_memory as copy;
48+ #[ cfg( stage0) ] pub use self :: set_memory as write_bytes;
49+ #[ cfg( stage0) ] pub use self :: copy_nonoverlapping_memory as copy_nonoverlapping;
50+
4751extern "rust-intrinsic" {
4852
4953 // NB: These intrinsics take unsafe pointers because they mutate aliased
@@ -246,7 +250,7 @@ extern "rust-intrinsic" {
246250 /// Copies `count * size_of<T>` bytes from `src` to `dst`. The source
247251 /// and destination may *not* overlap.
248252 ///
249- /// `copy_nonoverlapping_memory ` is semantically equivalent to C's `memcpy`.
253+ /// `copy_nonoverlapping ` is semantically equivalent to C's `memcpy`.
250254 ///
251255 /// # Safety
252256 ///
@@ -271,9 +275,9 @@ extern "rust-intrinsic" {
271275 /// let mut t: T = mem::uninitialized();
272276 ///
273277 /// // Perform the swap, `&mut` pointers never alias
274- /// ptr::copy_nonoverlapping_memory (&mut t, &*x, 1);
275- /// ptr::copy_nonoverlapping_memory (x, &*y, 1);
276- /// ptr::copy_nonoverlapping_memory (y, &t, 1);
278+ /// ptr::copy_nonoverlapping (&mut t, &*x, 1);
279+ /// ptr::copy_nonoverlapping (x, &*y, 1);
280+ /// ptr::copy_nonoverlapping (y, &t, 1);
277281 ///
278282 /// // y and t now point to the same thing, but we need to completely forget `tmp`
279283 /// // because it's no longer relevant.
@@ -282,12 +286,18 @@ extern "rust-intrinsic" {
282286 /// }
283287 /// ```
284288 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
289+ #[ cfg( not( stage0) ) ]
290+ pub fn copy_nonoverlapping < T > ( dst : * mut T , src : * const T , count : usize ) ;
291+
292+ /// dox
293+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
294+ #[ cfg( stage0) ]
285295 pub fn copy_nonoverlapping_memory < T > ( dst : * mut T , src : * const T , count : usize ) ;
286296
287297 /// Copies `count * size_of<T>` bytes from `src` to `dst`. The source
288298 /// and destination may overlap.
289299 ///
290- /// `copy_memory ` is semantically equivalent to C's `memmove`.
300+ /// `copy ` is semantically equivalent to C's `memmove`.
291301 ///
292302 /// # Safety
293303 ///
@@ -306,16 +316,28 @@ extern "rust-intrinsic" {
306316 /// unsafe fn from_buf_raw<T>(ptr: *const T, elts: uint) -> Vec<T> {
307317 /// let mut dst = Vec::with_capacity(elts);
308318 /// dst.set_len(elts);
309- /// ptr::copy_memory (dst.as_mut_ptr(), ptr, elts);
319+ /// ptr::copy (dst.as_mut_ptr(), ptr, elts);
310320 /// dst
311321 /// }
312322 /// ```
313323 ///
324+ #[ cfg( not( stage0) ) ]
325+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
326+ pub fn copy < T > ( dst : * mut T , src : * const T , count : usize ) ;
327+
328+ /// dox
329+ #[ cfg( stage0) ]
314330 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
315331 pub fn copy_memory < T > ( dst : * mut T , src : * const T , count : usize ) ;
316332
317333 /// Invokes memset on the specified pointer, setting `count * size_of::<T>()`
318334 /// bytes of memory starting at `dst` to `c`.
335+ #[ cfg( not( stage0) ) ]
336+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
337+ pub fn write_bytes < T > ( dst : * mut T , val : u8 , count : usize ) ;
338+
339+ /// dox
340+ #[ cfg( stage0) ]
319341 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
320342 pub fn set_memory < T > ( dst : * mut T , val : u8 , count : usize ) ;
321343
0 commit comments