Skip to content

Commit 0bdac78

Browse files
committed
auto merge of #16897 : japaric/rust/mut-slice-collection, r=alexcrichton
2 parents 01364c4 + 417e4b4 commit 0bdac78

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/libcore/slice.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,15 @@ impl<'a, T> Collection for &'a [T] {
996996
}
997997
}
998998

999+
#[experimental = "trait is experimental"]
1000+
impl<'a, T> Collection for &'a mut [T] {
1001+
/// Returns the length of a vector
1002+
#[inline]
1003+
fn len(&self) -> uint {
1004+
self.repr().len
1005+
}
1006+
}
1007+
9991008
#[unstable = "waiting for DST"]
10001009
impl<'a, T> Default for &'a [T] {
10011010
fn default() -> &'a [T] { &[] }

0 commit comments

Comments
 (0)