This is the latest docs version
Quick Links
  • -Overview
  • -Language Features
  • -JS Interop
  • -Build System
Documentation
Language Manual
Reference for all language features
ReScript & React
First class bindings for ReactJS
GenType
Seamless TypeScript integration
Reanalyze
Dead Code & Termination analysis
Exploration
Packages
Explore third party libraries and bindings
Syntax Lookup
Discover all syntax constructs
APIPlaygroundBlogCommunity
  • Playground
  • Blog
  • Twitter
  • GitHub
  • Forum
Language Manual
Overview
  • Introduction
  • Installation
  • Migrate to v11
  • Editor Plugins
  • Try
Language Features
  • Overview
  • Let Binding
  • Type
  • Primitive Types
  • Tuple
  • Record
  • Object
  • Variant
  • Polymorphic Variant
  • Null, Undefined and Option
  • Array & List
  • Function
  • If-Else & Loops
  • Pipe
  • Pattern Matching / Destructuring
  • Mutation
  • JSX
  • Exception
  • Lazy Value
  • Promises
  • Async / Await
  • Tagged templates
  • Module
  • Import & Export
  • Attribute (Decorator)
  • Reserved Keywords
  • Equality and Comparison
Advanced Features
  • Extensible Variant
  • Scoped Polymorphic Types
JavaScript Interop
  • Interop Cheatsheet
  • Embed Raw JavaScript
  • Shared Data Types
  • External (Bind to Any JS Library)
  • Bind to JS Object
  • Bind to JS Function
  • Import from / Export to JS
  • Bind to Global JS Values
  • JSON
  • Inlining Constants
  • Use Illegal Identifier Names
  • Generate Converters & Helpers
  • Browser Support & Polyfills
  • Libraries & Publishing
  • TypeScript
Build System
  • Overview
  • Configuration
  • Configuration Schema
  • External Stdlib
  • Pinned Dependencies
  • Interop with JS Build Systems
  • Performance
  • Warning Numbers
Guides
  • Converting from JS
Extra
  • Newcomer Examples
  • Project Structure
  • FAQ
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() or 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.
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.
14Illegal backslash escape in a string constant.
16Unerasable optional argument.
20Unused function argument.
21Non-returning statement.
23Useless record "with" clause.
24Bad module name: the source file name is not a valid ReScript module name.
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.
32Unused value declaration.
33Unused open statement.
34Unused type declaration.
35Unused for-loop index.
36Unused ancestor variable.
37Unused constructor.
38Unused extension constructor.
39Unused rec flag.
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.
52Fragile constant pattern.
53Attribute cannot appear in this context
54Attribute used more than once on an expression
56Unreachable case in a pattern-matching (based on type information).
57Ambiguous or-pattern variables under guard
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
110Todo found
PerformanceConverting from JS

© 2024 The ReScript Project

Software and assets distribution powered by KeyCDN.

About
  • Community
  • ReScript Association
Find us on