@@ -52,7 +52,7 @@ declare_clippy_lint! {
5252declare_lint_pass ! ( AssigningClones => [ ASSIGNING_CLONES ] ) ;
5353
5454impl < ' tcx > LateLintPass < ' tcx > for AssigningClones {
55- fn check_expr ( & mut self , cx : & LateContext < ' tcx > , assign_expr : & ' tcx hir :: Expr < ' _ > ) {
55+ fn check_expr ( & mut self , cx : & LateContext < ' tcx > , assign_expr : & ' tcx Expr < ' _ > ) {
5656 // Do not fire the lint in macros
5757 let expn_data = assign_expr. span ( ) . ctxt ( ) . outer_expn_data ( ) ;
5858 match expn_data. kind {
@@ -184,12 +184,7 @@ fn is_ok_to_suggest<'tcx>(cx: &LateContext<'tcx>, lhs: &Expr<'tcx>, call: &CallC
184184 implemented_fns. contains_key ( & provided_fn. def_id )
185185}
186186
187- fn suggest < ' tcx > (
188- cx : & LateContext < ' tcx > ,
189- assign_expr : & hir:: Expr < ' tcx > ,
190- lhs : & hir:: Expr < ' tcx > ,
191- call : & CallCandidate < ' tcx > ,
192- ) {
187+ fn suggest < ' tcx > ( cx : & LateContext < ' tcx > , assign_expr : & Expr < ' tcx > , lhs : & Expr < ' tcx > , call : & CallCandidate < ' tcx > ) {
193188 span_lint_and_then ( cx, ASSIGNING_CLONES , assign_expr. span , call. message ( ) , |diag| {
194189 let mut applicability = Applicability :: MachineApplicable ;
195190
@@ -242,7 +237,7 @@ impl<'tcx> CallCandidate<'tcx> {
242237 fn suggested_replacement (
243238 & self ,
244239 cx : & LateContext < ' tcx > ,
245- lhs : & hir :: Expr < ' tcx > ,
240+ lhs : & Expr < ' tcx > ,
246241 applicability : & mut Applicability ,
247242 ) -> String {
248243 match self . target {
0 commit comments