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
399
399
| Unused_open s -> " unused open " ^ s ^ " ."
400
400
| Unused_type_declaration s -> " unused type " ^ s ^ " ."
401
401
| 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 ^ " ."
405
403
| Unused_constructor (s , true , _ ) ->
406
404
" constructor " ^ s
407
405
^ " is never used to build values.\n \
@@ -483,7 +481,6 @@ let message = function
483
481
| Constraint_on_gadt ->
484
482
" Type constraints do not apply to GADT cases of variant types."
485
483
| Bs_unused_attribute s ->
486
- (* TODO(actions) Remove attribute *)
487
484
" Unused attribute: @" ^ s
488
485
^ " \n \
489
486
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 =
97
97
| Useless_record_with ->
98
98
add_possible_action
99
99
{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 _ =" }
100
105
(*
101
106
102
107
=== TODO ===
103
108
104
109
*)
105
110
| Unused_pat -> (* Remove pattern *) ()
106
111
| Unused_argument -> (* Remove unused argument or prefix with underscore *) ()
112
+ | Unused_constructor _ -> (* Remove unused constructor *) ()
107
113
| 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 *) ()
113
115
| _ -> ()
114
116
115
117
let _ =
You can’t perform that action at this time.
0 commit comments