@@ -27,7 +27,7 @@ use rustc_middle::middle::region;
2727use rustc_middle:: ty:: { self , Ty , TyS } ;
2828use rustc_session:: { declare_lint_pass, declare_tool_lint} ;
2929use rustc_span:: source_map:: Span ;
30- use rustc_span:: symbol:: { Ident , Symbol } ;
30+ use rustc_span:: symbol:: { sym , Ident , Symbol } ;
3131use rustc_typeck:: expr_use_visitor:: { ConsumeMode , Delegate , ExprUseVisitor , PlaceBase , PlaceWithHirId } ;
3232use std:: iter:: { once, Iterator } ;
3333use std:: mem;
@@ -2442,7 +2442,7 @@ fn check_needless_collect_indirect_usage<'tcx>(expr: &'tcx Expr<'_>, cx: &LateCo
24422442 if let Some ( ref generic_args) = method_name. args;
24432443 if let Some ( GenericArg :: Type ( ref ty) ) = generic_args. args. get( 0 ) ;
24442444 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) ||
24462446 is_type_diagnostic_item( cx, ty, sym!( vecdeque_type) ) ||
24472447 match_type( cx, ty, & paths:: LINKED_LIST ) ;
24482448 if let Some ( iter_calls) = detect_iter_and_into_iters( block, * ident) ;
@@ -2524,12 +2524,11 @@ impl<'tcx> Visitor<'tcx> for IterFunctionVisitor {
25242524 if let & [ name] = & path. segments;
25252525 if name. ident == self . target;
25262526 then {
2527- let into_iter = sym!( into_iter) ;
25282527 let len = sym!( len) ;
25292528 let is_empty = sym!( is_empty) ;
25302529 let contains = sym!( contains) ;
25312530 match method_name. ident. name {
2532- name if name == into_iter => self . uses. push(
2531+ sym :: into_iter => self . uses. push(
25332532 IterFunction { func: IterFunctionKind :: IntoIter , span: expr. span }
25342533 ) ,
25352534 name if name == len => self . uses. push(
0 commit comments