@@ -1568,7 +1568,7 @@ impl<'tcx> LateLintPass<'tcx> for Methods {
15681568 lint_expect_fun_call ( cx, expr, * method_span, & method_call. ident . as_str ( ) , args) ;
15691569
15701570 let self_ty = cx. typeck_results ( ) . expr_ty_adjusted ( & args[ 0 ] ) ;
1571- if args. len ( ) == 1 && method_call. ident . name == sym ! ( clone) {
1571+ if args. len ( ) == 1 && method_call. ident . name == sym:: clone {
15721572 lint_clone_on_copy ( cx, expr, & args[ 0 ] , self_ty) ;
15731573 lint_clone_on_ref_ptr ( cx, expr, & args[ 0 ] ) ;
15741574 }
@@ -1592,7 +1592,7 @@ impl<'tcx> LateLintPass<'tcx> for Methods {
15921592 }
15931593 }
15941594 } ,
1595- ty:: Ref ( ..) if method_call. ident . name == sym ! ( into_iter) => {
1595+ ty:: Ref ( ..) if method_call. ident . name == sym:: into_iter => {
15961596 lint_into_iter ( cx, expr, self_ty, * method_span) ;
15971597 } ,
15981598 _ => ( ) ,
@@ -2638,9 +2638,9 @@ fn lint_unwrap(cx: &LateContext<'_>, expr: &hir::Expr<'_>, unwrap_args: &[hir::E
26382638fn lint_expect ( cx : & LateContext < ' _ > , expr : & hir:: Expr < ' _ > , expect_args : & [ hir:: Expr < ' _ > ] ) {
26392639 let obj_ty = cx. typeck_results ( ) . expr_ty ( & expect_args[ 0 ] ) . peel_refs ( ) ;
26402640
2641- let mess = if is_type_diagnostic_item ( cx, obj_ty, sym ! ( option_type) ) {
2641+ let mess = if is_type_diagnostic_item ( cx, obj_ty, sym:: option_type) {
26422642 Some ( ( EXPECT_USED , "an Option" , "None" ) )
2643- } else if is_type_diagnostic_item ( cx, obj_ty, sym ! ( result_type) ) {
2643+ } else if is_type_diagnostic_item ( cx, obj_ty, sym:: result_type) {
26442644 Some ( ( EXPECT_USED , "a Result" , "Err" ) )
26452645 } else {
26462646 None
@@ -3133,7 +3133,7 @@ fn lint_search_is_some<'tcx>(
31333133 else if search_method == "find" {
31343134 let is_string_or_str_slice = |e| {
31353135 let self_ty = cx. typeck_results ( ) . expr_ty ( e) . peel_refs ( ) ;
3136- if is_type_diagnostic_item ( cx, self_ty, sym ! ( string_type) ) {
3136+ if is_type_diagnostic_item ( cx, self_ty, sym:: string_type) {
31373137 true
31383138 } else {
31393139 * self_ty. kind ( ) == ty:: Str
0 commit comments