File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
test/run-pass/rfc-1789-as-cell Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -507,10 +507,12 @@ impl<T: ?Sized> Cell<T> {
507507 /// ```
508508 /// #![feature(as_cell)]
509509 /// use std::cell::Cell;
510- /// let slice: &mut [i32] = &mut [1,2,3];
510+ ///
511+ /// let slice: &mut [i32] = &mut [1, 2, 3];
511512 /// let cell_slice: &Cell<[i32]> = Cell::from_mut(slice);
512513 /// assert_eq!(cell_slice.len(), 3);
513- /// let slice_cell : &[Cell<i32>] = &cell_slice[..];
514+ ///
515+ /// let slice_cell: &[Cell<i32>] = &cell_slice[..];
514516 /// assert_eq!(slice_cell.len(), 3);
515517 /// ```
516518 #[ inline]
Original file line number Diff line number Diff line change 1313use std:: cell:: Cell ;
1414
1515fn main ( ) {
16- let slice: & mut [ i32 ] = & mut [ 1 , 2 , 3 ] ;
16+ let slice: & mut [ i32 ] = & mut [ 1 , 2 , 3 ] ;
1717 let cell_slice: & Cell < [ i32 ] > = Cell :: from_mut ( slice) ;
1818 assert_eq ! ( cell_slice. len( ) , 3 ) ;
19- let sub_slice : & [ Cell < i32 > ] = & cell_slice[ 1 ..] ;
19+
20+ let sub_slice: & [ Cell < i32 > ] = & cell_slice[ 1 ..] ;
2021 assert_eq ! ( sub_slice. len( ) , 2 ) ;
2122}
You can’t perform that action at this time.
0 commit comments