@@ -2394,7 +2394,14 @@ impl<'a, T> InPlace<T> for PlaceBack<'a, T> {
2394
2394
}
2395
2395
2396
2396
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 ) ]
2398
2405
#[ unstable( feature = "splice" , reason = "recently added" , issue = "32310" ) ]
2399
2406
pub struct Splice < ' a , I : Iterator + ' a > {
2400
2407
drain : Drain < ' a , I :: Item > ,
@@ -2434,7 +2441,7 @@ impl<'a, I: Iterator> Drop for Splice<'a, I> {
2434
2441
2435
2442
unsafe {
2436
2443
if self . drain . tail_len == 0 {
2437
- let vec = & mut * self . drain . vec ;
2444
+ let vec = & mut * self . drain . vec . as_mut_ptr ( ) ;
2438
2445
vec. extend ( self . replace_with . by_ref ( ) ) ;
2439
2446
return
2440
2447
}
@@ -2476,7 +2483,7 @@ impl<'a, T> Drain<'a, T> {
2476
2483
/// Fill that range as much as possible with new elements from the `replace_with` iterator.
2477
2484
/// Return whether we filled the entire range. (`replace_with.next()` didn’t return `None`.)
2478
2485
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 ( ) ;
2480
2487
let range_start = vec. len ;
2481
2488
let range_end = self . tail_start ;
2482
2489
let range_slice = slice:: from_raw_parts_mut (
@@ -2496,7 +2503,7 @@ impl<'a, T> Drain<'a, T> {
2496
2503
2497
2504
/// Make room for inserting more elements before the tail.
2498
2505
unsafe fn move_tail ( & mut self , extra_capacity : usize ) {
2499
- let vec = & mut * self . vec ;
2506
+ let vec = & mut * self . vec . as_mut_ptr ( ) ;
2500
2507
let used_capacity = self . tail_start + self . tail_len ;
2501
2508
vec. buf . reserve ( used_capacity, extra_capacity) ;
2502
2509
0 commit comments