about summary refs log tree commit diff
path: root/src/libstd/c_vec.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-09-16 23:26:11 +0000
committerbors <bors@rust-lang.org>2014-09-16 23:26:11 +0000
commit0e784e16840e8a0c623cc6166de26da9334db3d6 (patch)
treecb9ee37525225e3cbe4cda7d7954f2f72d24acb8 /src/libstd/c_vec.rs
parentceb9bbfbf5933f9df238fecdd14e75304439c4f4 (diff)
parentfc525eeb4ec3443d29bce677f589b19f31c189bb (diff)
auto merge of #17268 : aturon/rust/mut-conventions, r=alexcrichton
As per [RFC 52](https://github.com/rust-lang/rfcs/blob/master/active/0052-ownership-variants.md), use `_mut` suffixes to mark mutable variants, and `into_iter` for moving iterators. Additional details and motivation in the RFC.

Note that the iterator *type* names are not changed by this RFC; those are awaiting a separate RFC for standardization.

Closes #13660
Closes #16810

[breaking-change]
Diffstat (limited to 'src/libstd/c_vec.rs')
-rw-r--r--src/libstd/c_vec.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/c_vec.rs b/src/libstd/c_vec.rs
index 5f52c0ada5d..d8a7305810f 100644
--- a/src/libstd/c_vec.rs
+++ b/src/libstd/c_vec.rs
@@ -73,7 +73,7 @@ impl<T> CVec<T> {
     /// * base - A raw pointer to a buffer
     /// * len - The number of elements in the buffer
     pub unsafe fn new(base: *mut T, len: uint) -> CVec<T> {
-        assert!(base != ptr::mut_null());
+        assert!(base != ptr::null_mut());
         CVec {
             base: base,
             len: len,
@@ -94,7 +94,7 @@ impl<T> CVec<T> {
     ///          for freeing the buffer, etc.
     pub unsafe fn new_with_dtor(base: *mut T, len: uint,
                                 dtor: proc():Send) -> CVec<T> {
-        assert!(base != ptr::mut_null());
+        assert!(base != ptr::null_mut());
         CVec {
             base: base,
             len: len,
@@ -191,7 +191,7 @@ mod tests {
     #[should_fail]
     fn test_fail_at_null() {
         unsafe {
-            CVec::new(ptr::mut_null::<u8>(), 9);
+            CVec::new(ptr::null_mut::<u8>(), 9);
         }
     }