File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -399,9 +399,7 @@ let message = function
399399 | Unused_open s -> " unused open " ^ s ^ " ."
400400 | Unused_type_declaration s -> " unused type " ^ s ^ " ."
401401 | Unused_for_index s -> " unused for-loop index " ^ s ^ " ."
402- | Unused_constructor (s , false , false ) ->
403- (* TODO(actions) Remove constructor *)
404- " unused constructor " ^ s ^ " ."
402+ | Unused_constructor (s , false , false ) -> " unused constructor " ^ s ^ " ."
405403 | Unused_constructor (s , true , _ ) ->
406404 " constructor " ^ s
407405 ^ " is never used to build values.\n \
@@ -483,7 +481,6 @@ let message = function
483481 | Constraint_on_gadt ->
484482 " Type constraints do not apply to GADT cases of variant types."
485483 | Bs_unused_attribute s ->
486- (* TODO(actions) Remove attribute *)
487484 " Unused attribute: @" ^ s
488485 ^ " \n \
489486 This attribute has no effect here.\n \
Original file line number Diff line number Diff line change @@ -97,19 +97,21 @@ let emit_possible_actions_from_warning loc w =
9797 | Useless_record_with ->
9898 add_possible_action
9999 {loc; action = RemoveRecordSpread ; description = " Remove `...` spread" }
100+ | Bs_toplevel_expression_unit _ ->
101+ add_possible_action
102+ {loc; action = PipeToIgnore ; description = " Pipe to ignore()" };
103+ add_possible_action
104+ {loc; action = AssignToUnderscore ; description = " Assign to let _ =" }
100105 (*
101106
102107 === TODO ===
103108
104109 *)
105110 | Unused_pat -> (* Remove pattern *) ()
106111 | Unused_argument -> (* Remove unused argument or prefix with underscore *) ()
112+ | Unused_constructor _ -> (* Remove unused constructor *) ()
107113 | Nonoptional_label _ -> (* Add `?` to make argument optional *) ()
108- | Bs_toplevel_expression_unit _ ->
109- add_possible_action
110- {loc; action = PipeToIgnore ; description = " Pipe to ignore()" };
111- add_possible_action
112- {loc; action = AssignToUnderscore ; description = " Assign to let _ =" }
114+ | Bs_unused_attribute _ -> (* Remove unused attribute *) ()
113115 | _ -> ()
114116
115117let _ =
You can’t perform that action at this time.
0 commit comments