Docs / Language Manual / Warning Numbers
Edit

Warning Numbers

You can configure which warnings the ReScript compiler generates in the build configuration or using the @@warning() decorator.

#Description
aAll flags
1Suspicious-looking start-of-comment mark.
2Suspicious-looking end-of-comment mark.
3Deprecated feature.
4Fragile pattern matching: matching that will remain complete even if additional constructors are added to one of the variant types matched.
5Partially applied function: expression whose result has function type and is ignored.
6Label omitted in function application.
7Method overridden.
8Partial match: missing cases in pattern-matching.
9Missing fields in a record pattern.
10Expression on the left-hand side of a sequence that doesn't have type "unit" (and that is not a function, see warning number 5).
11Redundant case in a pattern matching (unused match case).
12Redundant sub-pattern in a pattern-matching.
13Instance variable overridden.
14Illegal backslash escape in a string constant.
15Private method made public implicitly.
16Unerasable optional argument.
17Undeclared virtual method.
18Non-principal type.
19Type without principality.
20Unused function argument.
21Non-returning statement.
22Preprocessor warning.
23Useless record "with" clause.
24Bad module name: the source file name is not a valid OCaml module name.
25Deprecated: now part of warning 8.
26Suspicious unused variable: unused variable that is bound with "let" or "as", and doesn't start with an underscore ("_") character.
27Innocuous unused variable: unused variable that is not bound with "let" nor "as", and doesn't start with an underscore ("_") character.
28Wildcard pattern given as argument to a constant constructor.
29Unescaped end-of-line in a string constant (non-portable code).
30Two labels or constructors of the same name are defined in two mutually recursive types.
31A module is linked twice in the same executable.
32Unused value declaration.
33Unused open statement.
34Unused type declaration.
35Unused for-loop index.
36Unused ancestor variable.
37Unused constructor.
38Unused extension constructor.
39Unused rec flag.
40Constructor or label name used out of scope.
41Ambiguous constructor or label name.
42Disambiguated constructor or label name (compatibility warning).
43Nonoptional label applied as optional.
44Open statement shadows an already defined identifier.
45Open statement shadows an already defined label or constructor.
46Error in environment variable.
47Illegal attribute payload.
48Implicit elimination of optional arguments.
49Absent cmi file when looking up module alias.
50Unexpected documentation comment.
51Warning on non-tail calls if @tailcall present.
52Fragile constant pattern.
53Attribute cannot appear in this context
54Attribute used more than once on an expression
55Inlining impossible
56Unreachable case in a pattern-matching (based on type information).
57Ambiguous or-pattern variables under guard
58Missing cmx file
59Assignment to non-mutable value
60Unused module declaration
61Unboxable type in primitive declaration
62Type constraint on GADT type declaration
101Unused bs attributes
102Polymorphic comparison introduced (maybe unsafe)
103Fragile FFI definitions
104bs.deriving warning with customized message
105External name is inferred from val name is unsafe from refactoring when changing value name
106Unimplemented primitive used:
107Integer literal exceeds the range of representable integers of type int
108Uninterpreted delimiters (for unicode)
109Toplevel expression has unit type