@@ -153,7 +153,7 @@ fn check_addr_of_expr(
153153 }
154154 if let Some ( deref_trait_id) = cx. tcx . get_diagnostic_item ( sym:: Deref )
155155 && implements_trait ( cx, receiver_ty, deref_trait_id, & [ ] )
156- && cx. get_associated_type ( receiver_ty, deref_trait_id, " Target" ) == Some ( target_ty)
156+ && cx. get_associated_type ( receiver_ty, deref_trait_id, sym :: Target ) == Some ( target_ty)
157157 // Make sure that it's actually calling the right `.to_string()`, (#10033)
158158 // *or* this is a `Cow::into_owned()` call (which would be the wrong into_owned receiver (str != Cow)
159159 // but that's ok for Cow::into_owned specifically)
@@ -322,7 +322,7 @@ fn check_split_call_arg(cx: &LateContext<'_>, expr: &Expr<'_>, method_name: Symb
322322 // add `.as_ref()` to the suggestion.
323323 let as_ref = if is_type_lang_item ( cx, cx. typeck_results ( ) . expr_ty ( expr) , LangItem :: String )
324324 && let Some ( deref_trait_id) = cx. tcx . get_diagnostic_item ( sym:: Deref )
325- && cx. get_associated_type ( cx. typeck_results ( ) . expr_ty ( receiver) , deref_trait_id, " Target" )
325+ && cx. get_associated_type ( cx. typeck_results ( ) . expr_ty ( receiver) , deref_trait_id, sym :: Target )
326326 != Some ( cx. tcx . types . str_ )
327327 {
328328 ".as_ref()"
@@ -648,7 +648,7 @@ fn is_to_string_on_string_like<'a>(
648648 && let GenericArgKind :: Type ( ty) = generic_arg. unpack ( )
649649 && let Some ( deref_trait_id) = cx. tcx . get_diagnostic_item ( sym:: Deref )
650650 && let Some ( as_ref_trait_id) = cx. tcx . get_diagnostic_item ( sym:: AsRef )
651- && ( cx. get_associated_type ( ty, deref_trait_id, " Target" ) == Some ( cx. tcx . types . str_ )
651+ && ( cx. get_associated_type ( ty, deref_trait_id, sym :: Target ) == Some ( cx. tcx . types . str_ )
652652 || implements_trait ( cx, ty, as_ref_trait_id, & [ cx. tcx . types . str_ . into ( ) ] ) )
653653 {
654654 true
0 commit comments