Rename Unused_match => Unused_case

master
Nicolás Ojeda Bär 2020-07-10 17:57:29 +02:00
parent fd48548c05
commit 45d14467cd
3 changed files with 7 additions and 7 deletions

View File

@ -2083,7 +2083,7 @@ let do_check_fragile loc casel pss =
(********************************)
let check_unused pred casel =
if Warnings.is_active Warnings.Unused_match
if Warnings.is_active Warnings.Unused_case
|| List.exists (fun c -> c.c_rhs.exp_desc = Texp_unreachable) casel then
let rec do_rec pref = function
| [] -> ()
@ -2134,7 +2134,7 @@ let check_unused pred casel =
match r with
| Unused ->
Location.prerr_warning
q.pat_loc Warnings.Unused_match
q.pat_loc Warnings.Unused_case
| Upartial ps ->
List.iter
(fun p ->

View File

@ -35,7 +35,7 @@ type t =
| Partial_match of string (* 8 *)
| Non_closed_record_pattern of string (* 9 *)
| Non_unit_statement (* 10 *)
| Unused_match (* 11 *)
| Unused_case (* 11 *)
| Unused_pat (* 12 *)
| Instance_variable_override of string list (* 13 *)
| Illegal_backslash (* 14 *)
@ -112,7 +112,7 @@ let number = function
| Partial_match _ -> 8
| Non_closed_record_pattern _ -> 9
| Non_unit_statement -> 10
| Unused_match -> 11
| Unused_case -> 11
| Unused_pat -> 12
| Instance_variable_override _ -> 13
| Illegal_backslash -> 14
@ -207,7 +207,7 @@ let descriptions =
\ \"unit\" (and that is not a function, see warning number 5).",
["statement-type"];
11, "Redundant case in a pattern matching (unused match case).",
["unused-match"];
["unused-case"];
12, "Redundant sub-pattern in a pattern-matching.",
["unused-pat"];
13, "Instance variable overridden.",
@ -614,7 +614,7 @@ let message = function
"\nEither bind these labels explicitly or add '; _' to the pattern."
| Non_unit_statement ->
"this expression should have type unit."
| Unused_match -> "this match case is unused."
| Unused_case -> "this match case is unused."
| Unused_pat -> "this sub-pattern is unused."
| Instance_variable_override [lab] ->
"the instance variable " ^ lab ^ " is overridden.\n" ^

View File

@ -37,7 +37,7 @@ type t =
| Partial_match of string (* 8 *)
| Non_closed_record_pattern of string (* 9 *)
| Non_unit_statement (* 10 *)
| Unused_match (* 11 *)
| Unused_case (* 11 *)
| Unused_pat (* 12 *)
| Instance_variable_override of string list (* 13 *)
| Illegal_backslash (* 14 *)