diff options
Diffstat (limited to 'utils/warnings.ml')
-rw-r--r-- | utils/warnings.ml | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/utils/warnings.ml b/utils/warnings.ml index 016a92f4b7..23d4c35b7d 100644 --- a/utils/warnings.ml +++ b/utils/warnings.ml @@ -108,6 +108,7 @@ type t = | Missing_mli (* 70 *) | Unused_tmc_attribute (* 71 *) | Tmc_breaks_tailcall (* 72 *) + | Generative_application_expects_unit (* 73 *) (* If you remove a warning, leave a hole in the numbering. NEVER change the numbers of existing warnings. @@ -188,12 +189,13 @@ let number = function | Missing_mli -> 70 | Unused_tmc_attribute -> 71 | Tmc_breaks_tailcall -> 72 + | Generative_application_expects_unit -> 73 ;; (* DO NOT REMOVE the ;; above: it is used by the testsuite/ests/warnings/mnemonics.mll test to determine where the definition of the number function above ends *) -let last_warning_number = 72 +let last_warning_number = 73 type description = { number : int; @@ -527,6 +529,11 @@ let descriptions = [ description = "A tail call is turned into a non-tail call \ by the @tail_mod_cons transformation."; since = since 4 14 }; + { number = 73; + names = ["generative-application-expects-unit"]; + description = "A generative functor is applied to an empty structure \ + (struct end) rather than to ()."; + since = since 5 1 }; ] let name_to_number = @@ -1122,12 +1129,15 @@ let message = function but is never applied in TMC position." | Tmc_breaks_tailcall -> "This call\n\ - is in tail-modulo-cons positionin a TMC function,\n\ + is in tail-modulo-cons position in a TMC function,\n\ but the function called is not itself specialized for TMC,\n\ so the call will not be transformed into a tail call.\n\ Please either mark the called function with the [@tail_mod_cons]\n\ attribute, or mark this call with the [@tailcall false] attribute\n\ to make its non-tailness explicit." + | Generative_application_expects_unit -> + "A generative functor\n\ + should be applied to '()'; using '(struct end)' is deprecated." ;; let nerrors = ref 0 |