@@ -499,7 +499,7 @@ pub trait PrintState<'a>: std::ops::Deref<Target = pp::Printer> + std::ops::Dere
499
499
ast:: MetaItemKind :: List ( ref items) => {
500
500
self . print_path ( & item. path , false , 0 ) ;
501
501
self . popen ( ) ;
502
- self . commasep ( Consistent , & items[ .. ] , |s, i| s. print_meta_list_item ( i) ) ;
502
+ self . commasep ( Consistent , & items, |s, i| s. print_meta_list_item ( i) ) ;
503
503
self . pclose ( ) ;
504
504
}
505
505
}
@@ -997,7 +997,7 @@ impl<'a> State<'a> {
997
997
}
998
998
ast:: TyKind :: Tup ( ref elts) => {
999
999
self . popen ( ) ;
1000
- self . commasep ( Inconsistent , & elts[ .. ] , |s, ty| s. print_type ( ty) ) ;
1000
+ self . commasep ( Inconsistent , & elts, |s, ty| s. print_type ( ty) ) ;
1001
1001
if elts. len ( ) == 1 {
1002
1002
self . s . word ( "," ) ;
1003
1003
}
@@ -1017,10 +1017,10 @@ impl<'a> State<'a> {
1017
1017
ast:: TyKind :: Path ( Some ( ref qself) , ref path) => self . print_qpath ( path, qself, false ) ,
1018
1018
ast:: TyKind :: TraitObject ( ref bounds, syntax) => {
1019
1019
let prefix = if syntax == ast:: TraitObjectSyntax :: Dyn { "dyn" } else { "" } ;
1020
- self . print_type_bounds ( prefix, & bounds[ .. ] ) ;
1020
+ self . print_type_bounds ( prefix, & bounds) ;
1021
1021
}
1022
1022
ast:: TyKind :: ImplTrait ( _, ref bounds) => {
1023
- self . print_type_bounds ( "impl" , & bounds[ .. ] ) ;
1023
+ self . print_type_bounds ( "impl" , & bounds) ;
1024
1024
}
1025
1025
ast:: TyKind :: Array ( ref ty, ref length) => {
1026
1026
self . s . word ( "[" ) ;
@@ -1339,7 +1339,7 @@ impl<'a> State<'a> {
1339
1339
real_bounds. push ( b. clone ( ) ) ;
1340
1340
}
1341
1341
}
1342
- self . print_type_bounds ( ":" , & real_bounds[ .. ] ) ;
1342
+ self . print_type_bounds ( ":" , & real_bounds) ;
1343
1343
self . print_where_clause ( & generics. where_clause ) ;
1344
1344
self . s . word ( " " ) ;
1345
1345
self . bopen ( ) ;
@@ -1368,7 +1368,7 @@ impl<'a> State<'a> {
1368
1368
}
1369
1369
}
1370
1370
self . nbsp ( ) ;
1371
- self . print_type_bounds ( "=" , & real_bounds[ .. ] ) ;
1371
+ self . print_type_bounds ( "=" , & real_bounds) ;
1372
1372
self . print_where_clause ( & generics. where_clause ) ;
1373
1373
self . s . word ( ";" ) ;
1374
1374
}
@@ -1960,10 +1960,10 @@ impl<'a> State<'a> {
1960
1960
self . print_expr_tup ( exprs) ;
1961
1961
}
1962
1962
ast:: ExprKind :: Call ( ref func, ref args) => {
1963
- self . print_expr_call ( func, & args[ .. ] ) ;
1963
+ self . print_expr_call ( func, & args) ;
1964
1964
}
1965
1965
ast:: ExprKind :: MethodCall ( ref segment, ref args, _) => {
1966
- self . print_expr_method_call ( segment, & args[ .. ] ) ;
1966
+ self . print_expr_method_call ( segment, & args) ;
1967
1967
}
1968
1968
ast:: ExprKind :: Binary ( op, ref lhs, ref rhs) => {
1969
1969
self . print_expr_binary ( op, lhs, rhs) ;
@@ -2443,11 +2443,11 @@ impl<'a> State<'a> {
2443
2443
self . print_path ( path, true , 0 ) ;
2444
2444
}
2445
2445
self . popen ( ) ;
2446
- self . commasep ( Inconsistent , & elts[ .. ] , |s, p| s. print_pat ( p) ) ;
2446
+ self . commasep ( Inconsistent , & elts, |s, p| s. print_pat ( p) ) ;
2447
2447
self . pclose ( ) ;
2448
2448
}
2449
2449
PatKind :: Or ( ref pats) => {
2450
- self . strsep ( "|" , true , Inconsistent , & pats[ .. ] , |s, p| s. print_pat ( p) ) ;
2450
+ self . strsep ( "|" , true , Inconsistent , & pats, |s, p| s. print_pat ( p) ) ;
2451
2451
}
2452
2452
PatKind :: Path ( None , ref path) => {
2453
2453
self . print_path ( path, true , 0 ) ;
@@ -2465,7 +2465,7 @@ impl<'a> State<'a> {
2465
2465
self . word_space ( "{" ) ;
2466
2466
self . commasep_cmnt (
2467
2467
Consistent ,
2468
- & fields[ .. ] ,
2468
+ & fields,
2469
2469
|s, f| {
2470
2470
s. cbox ( INDENT_UNIT ) ;
2471
2471
if !f. is_shorthand {
@@ -2488,7 +2488,7 @@ impl<'a> State<'a> {
2488
2488
}
2489
2489
PatKind :: Tuple ( ref elts) => {
2490
2490
self . popen ( ) ;
2491
- self . commasep ( Inconsistent , & elts[ .. ] , |s, p| s. print_pat ( p) ) ;
2491
+ self . commasep ( Inconsistent , & elts, |s, p| s. print_pat ( p) ) ;
2492
2492
if elts. len ( ) == 1 {
2493
2493
self . s . word ( "," ) ;
2494
2494
}
@@ -2530,7 +2530,7 @@ impl<'a> State<'a> {
2530
2530
}
2531
2531
PatKind :: Slice ( ref elts) => {
2532
2532
self . s . word ( "[" ) ;
2533
- self . commasep ( Inconsistent , & elts[ .. ] , |s, p| s. print_pat ( p) ) ;
2533
+ self . commasep ( Inconsistent , & elts, |s, p| s. print_pat ( p) ) ;
2534
2534
self . s . word ( "]" ) ;
2535
2535
}
2536
2536
PatKind :: Rest => self . s . word ( ".." ) ,
@@ -2839,7 +2839,7 @@ impl<'a> State<'a> {
2839
2839
self . print_path ( & tree. prefix , false , 0 ) ;
2840
2840
self . s . word ( "::{" ) ;
2841
2841
}
2842
- self . commasep ( Inconsistent , & items[ .. ] , |this, & ( ref tree, _) | {
2842
+ self . commasep ( Inconsistent , & items, |this, & ( ref tree, _) | {
2843
2843
this. print_use_tree ( tree)
2844
2844
} ) ;
2845
2845
self . s . word ( "}" ) ;
0 commit comments