Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Diagnostics

The tables below are generated from the current compiler and runtime sources during every docs build. They are intended to stay in lockstep with the shipped implementation, not with the older archived site.

If you need to collect or inspect diagnostics programmatically from Rust, see Embedding in Rust.

Compiler Messages

CodeSeverityMessage Template
R0000errorunexpected token: '{}'
R0001errorexpected token: '{}'
R0002errorinteger literal is out of range for the \int` type; consider changing it (or if applicable, using a string instead)`
R0003errorfloat literal is out of range for the \float` type; consider changing it (or if applicable, using a string instead)`
R0004errorinvalid escape character: '{}'
R0005errorinvalid code point in unicode escape: '{}'
R0006errorunclosed block; expected '}'
R0007errorunclosed function call; expected ']'
R0008errorunclosed function signature; expected ']' followed by body block
R0009errorunclosed accessor; expected '>'
R0010errorunclosed string literal
R0011errorunclosed list initializer; expected ')'
R0012errorunclosed map initializer; expected ')'
R0013errorunclosed tuple; expected ')'
R0014errorunclosed parenthetical; expected ')'
R0015errorunclosed condition; expected ':'
R0021error{} is not allowed after {}
R0022errormissing body in function definition
R0023errorunclosed function body; expected '}}'
R0024errorinvalid parameter '{}'; must be a valid identifier or '*'
R0025errorduplicate parameter '{}' in function signature
R0026errormultiple variadic parameters are not allowed
R0027errortemporal assignment pipe could redefine variable '{}'
R0028errortemporal assignment pipe could redefine constant '{}'
R0029errorlazy parameters cannot be variadic
R0040errordynamic key blocks can't have more than one element; if branching is desired, create an inner block
R0041errorduplicate @{} modifier on block element
R0060errorcan't assign a value to an expression; try assigning to a child of it instead
R0061erroridentifier required but is missing
R0062error'{}' is not a valid identifier; identifiers may only use alphanumerics, underscores, and hyphens (but cannot be only digits)
R0063erroraccess paths cannot start with an index; consider using a variable or anonymous value here instead
R0064erroraccess paths cannot start with a slice; consider using a variable or anonymous value here instead
R0065errorinvalid slice bound: '{}'
R0066errorno pipe value is available in this scope
R0067erroraccess to optional argument '{}' can fail; add a fallback to the accessor or specify a default argument
R0068errorinvalid shorthand; only variable getters are supported
R0100errorreassignment of known constant '{}'
R0101errorredefinition of known constant '{}'
R0130errorsink is not valid on {}
R0131errorhint is not valid on {}
R0200errorinvalid keyword: '@{}'
R0201error@weight is not allowed in this context
R0202errormissing argument for @require
R0203error@require path should be a string literal
R0204errorcondition cannot be empty
R0205errorattribute keyword '@{}' does not support this accessor form
R0206errorattribute keyword '@{}' is read-only
R0207error@on is not allowed in this context
R0250errorexpected operand
R0251errorexpected left-hand operand
R0252errorexpected right-hand operand
R1000warningvariable '{}' is defined but never used
R1002warningparameter '{}' is never used
R1003warningfunction '{}' is defined but never used
R1004warningfunction '{}' is empty
R1005warningnested function definition can't be made constant; function will be mutable
R2100errorfile not found: '{}'
R2101errorfilesystem error: {}

Runtime Error Categories

CategorySummary
ARG_ERRORInvalid argument passed to function.
ARG_MISMATCH_ERRORToo few/many arguments were passed to a function.
ASSERT_ERRORAssertion failed.
CONTROL_FLOW_ERRORError during control flow operation (e.g. return or break).
DATA_SOURCE_ERRORError occurred during data source operation.
INDEX_ERRORError occurred while indexing value.
INTERNAL_ERRORInternal VM error, usually indicating a bug or corrupted data.
INVALID_ACCESS_ERRORVariable access error, such as attempting to access a nonexistent variable or write to a constant.
INVALID_OP_ERROROperation is not valid for the current program state.
INVOKE_ERRORTried to invoke a non-function.
KEY_ERRORError occurred while keying value.
LAZY_BINDING_CYCLE_ERRORLazy binding evaluation recursively depended on itself.
MODULE_ERRORError occurred while trying to load a module.
SELECTOR_ERRORError occurred while iterating selector.
SLICE_ERRORError occurred while slicing value.
STACK_OVERFLOW_ERRORStack has overflowed.
STACK_UNDERFLOW_ERRORStack has underflowed.
TYPE_ERRORError occurred due to unexpected value type.
USER_ERRORError manually triggered by program.
VALUE_ERRORError occurred when creating value.