about summary refs log tree commit diff
path: root/src/libcollections/vec.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-01-07 17:26:58 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-01-07 17:26:58 -0800
commit6e806bdefde91af102567ef4b5dbd3ccf0c5c2ec (patch)
treeb8627ad2c80976f618b661ec14695f6a322ad1b3 /src/libcollections/vec.rs
parentf6a7dc5528a9a9ac36867bbca2a6044b7be5bce2 (diff)
parent7d72719efc25c6cdb8963c187e93df646ba65245 (diff)
downloadrust-6e806bdefde91af102567ef4b5dbd3ccf0c5c2ec.tar.gz
rust-6e806bdefde91af102567ef4b5dbd3ccf0c5c2ec.zip
rollup merge of #20721: japaric/snap
Conflicts:
	src/libcollections/vec.rs
	src/libcore/fmt/mod.rs
	src/librustc/lint/builtin.rs
	src/librustc/session/config.rs
	src/librustc_trans/trans/base.rs
	src/librustc_trans/trans/context.rs
	src/librustc_trans/trans/type_.rs
	src/librustc_typeck/check/_match.rs
	src/librustdoc/html/format.rs
	src/libsyntax/std_inject.rs
	src/libsyntax/util/interner.rs
	src/test/compile-fail/mut-pattern-mismatched.rs
Diffstat (limited to 'src/libcollections/vec.rs')
-rw-r--r--src/libcollections/vec.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs
index e3b31d2b55d..d9344d130b2 100644
--- a/src/libcollections/vec.rs
+++ b/src/libcollections/vec.rs
@@ -1178,7 +1178,7 @@ impl<T:Clone> Clone for Vec<T> {
 
         // self.len <= other.len due to the truncate above, so the
         // slice here is always in-bounds.
-        let slice = other.index(&(self.len()..));
+        let slice = &other[self.len()..];
         self.push_all(slice);
     }
 }
@@ -2031,7 +2031,7 @@ mod tests {
         v.push(());
         assert_eq!(v.iter_mut().count(), 4);
 
-        for &() in v.iter_mut() {}
+        for &mut () in v.iter_mut() {}
         unsafe { v.set_len(0); }
         assert_eq!(v.iter_mut().count(), 0);
     }