@@ -27,7 +27,7 @@ use rustc_middle::middle::region;
27
27
use rustc_middle:: ty:: { self , Ty , TyS } ;
28
28
use rustc_session:: { declare_lint_pass, declare_tool_lint} ;
29
29
use rustc_span:: source_map:: Span ;
30
- use rustc_span:: symbol:: { Ident , Symbol } ;
30
+ use rustc_span:: symbol:: { sym , Ident , Symbol } ;
31
31
use rustc_typeck:: expr_use_visitor:: { ConsumeMode , Delegate , ExprUseVisitor , PlaceBase , PlaceWithHirId } ;
32
32
use std:: iter:: { once, Iterator } ;
33
33
use std:: mem;
@@ -2442,7 +2442,7 @@ fn check_needless_collect_indirect_usage<'tcx>(expr: &'tcx Expr<'_>, cx: &LateCo
2442
2442
if let Some ( ref generic_args) = method_name. args;
2443
2443
if let Some ( GenericArg :: Type ( ref ty) ) = generic_args. args. get( 0 ) ;
2444
2444
if let ty = cx. typeck_results( ) . node_type( ty. hir_id) ;
2445
- if is_type_diagnostic_item( cx, ty, sym! ( vec_type) ) ||
2445
+ if is_type_diagnostic_item( cx, ty, sym:: vec_type) ||
2446
2446
is_type_diagnostic_item( cx, ty, sym!( vecdeque_type) ) ||
2447
2447
match_type( cx, ty, & paths:: LINKED_LIST ) ;
2448
2448
if let Some ( iter_calls) = detect_iter_and_into_iters( block, * ident) ;
@@ -2524,12 +2524,11 @@ impl<'tcx> Visitor<'tcx> for IterFunctionVisitor {
2524
2524
if let & [ name] = & path. segments;
2525
2525
if name. ident == self . target;
2526
2526
then {
2527
- let into_iter = sym!( into_iter) ;
2528
2527
let len = sym!( len) ;
2529
2528
let is_empty = sym!( is_empty) ;
2530
2529
let contains = sym!( contains) ;
2531
2530
match method_name. ident. name {
2532
- name if name == into_iter => self . uses. push(
2531
+ sym :: into_iter => self . uses. push(
2533
2532
IterFunction { func: IterFunctionKind :: IntoIter , span: expr. span }
2534
2533
) ,
2535
2534
name if name == len => self . uses. push(
0 commit comments