@@ -2394,7 +2394,14 @@ impl<'a, T> InPlace<T> for PlaceBack<'a, T> {
23942394}
23952395
23962396
2397- /// A splicing iterator for `Vec<T>`. See the [`Vec::splice`](struct.Vec.html#method.splice) method.
2397+ /// A splicing iterator for `Vec`.
2398+ ///
2399+ /// This struct is created by the [`splice()`] method on [`Vec`]. See its
2400+ /// documentation for more.
2401+ ///
2402+ /// [`splice()`]: struct.Vec.html#method.splice
2403+ /// [`Vec`]: struct.Vec.html
2404+ #[ derive( Debug ) ]
23982405#[ unstable( feature = "splice" , reason = "recently added" , issue = "32310" ) ]
23992406pub struct Splice < ' a , I : Iterator + ' a > {
24002407 drain : Drain < ' a , I :: Item > ,
@@ -2434,7 +2441,7 @@ impl<'a, I: Iterator> Drop for Splice<'a, I> {
24342441
24352442 unsafe {
24362443 if self . drain . tail_len == 0 {
2437- let vec = & mut * self . drain . vec ;
2444+ let vec = & mut * self . drain . vec . as_mut_ptr ( ) ;
24382445 vec. extend ( self . replace_with . by_ref ( ) ) ;
24392446 return
24402447 }
@@ -2476,7 +2483,7 @@ impl<'a, T> Drain<'a, T> {
24762483 /// Fill that range as much as possible with new elements from the `replace_with` iterator.
24772484 /// Return whether we filled the entire range. (`replace_with.next()` didn’t return `None`.)
24782485 unsafe fn fill < I : Iterator < Item =T > > ( & mut self , replace_with : & mut I ) -> bool {
2479- let vec = & mut * self . vec ;
2486+ let vec = & mut * self . vec . as_mut_ptr ( ) ;
24802487 let range_start = vec. len ;
24812488 let range_end = self . tail_start ;
24822489 let range_slice = slice:: from_raw_parts_mut (
@@ -2496,7 +2503,7 @@ impl<'a, T> Drain<'a, T> {
24962503
24972504 /// Make room for inserting more elements before the tail.
24982505 unsafe fn move_tail ( & mut self , extra_capacity : usize ) {
2499- let vec = & mut * self . vec ;
2506+ let vec = & mut * self . vec . as_mut_ptr ( ) ;
25002507 let used_capacity = self . tail_start + self . tail_len ;
25012508 vec. buf . reserve ( used_capacity, extra_capacity) ;
25022509
0 commit comments