@@ -57,6 +57,10 @@ impl LintPass for AssignOps {
5757 fn get_lints ( & self ) -> LintArray {
5858 lint_array ! ( ASSIGN_OP_PATTERN , MISREFACTORED_ASSIGN_OP )
5959 }
60+
61+ fn name ( & self ) -> & ' static str {
62+ "AssignOps"
63+ }
6064}
6165
6266impl < ' a , ' tcx > LateLintPass < ' a , ' tcx > for AssignOps {
@@ -79,7 +83,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AssignOps {
7983 let r = & sugg:: Sugg :: hir ( cx, rhs, ".." ) ;
8084 let long =
8185 format ! ( "{} = {}" , snip_a, sugg:: make_binop( higher:: binop( op. node) , a, r) ) ;
82- db. span_suggestion_with_applicability (
86+ db. span_suggestion (
8387 expr. span ,
8488 & format ! (
8589 "Did you mean {} = {} {} {} or {}? Consider replacing it with" ,
@@ -92,7 +96,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AssignOps {
9296 format ! ( "{} {}= {}" , snip_a, op. node. as_str( ) , snip_r) ,
9397 Applicability :: MachineApplicable ,
9498 ) ;
95- db. span_suggestion_with_applicability (
99+ db. span_suggestion (
96100 expr. span ,
97101 "or" ,
98102 long,
@@ -179,7 +183,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AssignOps {
179183 if let ( Some ( snip_a) , Some ( snip_r) ) =
180184 ( snippet_opt ( cx, assignee. span ) , snippet_opt ( cx, rhs. span ) )
181185 {
182- db. span_suggestion_with_applicability (
186+ db. span_suggestion (
183187 expr. span ,
184188 "replace it with" ,
185189 format ! ( "{} {}= {}" , snip_a, op. node. as_str( ) , snip_r) ,
0 commit comments