Skip to main content

Diagnostic Index

Every diagnostic the checker can report, and the section that shows what causes it.

CodeShown in
abstract-requires-extensiblestruct — Marking a struct abstract without extensible
abstract-struct-instantiationstruct — Constructing an abstract struct
ambiguous-inferred-typearray — An empty literal with no element type
optional — An absent value with no type to be absent of
block-let-assert — An initializer with no type of its own
literals — A numeric literal nothing pins
annotation-arg-countannotation — The wrong number of arguments
annotation-arg-typeannotation — An argument the parameter's type does not accept
annotation-scope-mismatchannotation — Applying an annotation outside its scopes
array-index-typearray — An index that is not an integer
assert-condition-typestruct — An assertion whose condition is not bit
block-let-assert — An assertion whose condition is not bit
contract — An assert condition that is not bit
branch-else-not-lastbranch — An else arm that is not last
branch-guard-typebranch — A guard that is not bit
break-outside-looppositions — A break with no enclosing loop
loop — A break naming a loop that does not enclose it
loop — A break outside every loop
builtin-call-argsoptional — A fallback that is not the inner type
builtin-functions — An argument of the wrong type
builtin-functions — Serializing a width that is not a whole number of bytes
builtin-functions — Serializing something with no byte width
builtin-functions — The wrong number of arguments
call-arg-countvariant — Applying a constructor with the wrong number of arguments
function — Calling with the wrong number of arguments
call-arg-typevariant — A payload argument of the wrong type
function — An argument of the wrong type
choice-component-not-componentchoice — Deciding in something that is not a component
comprehension-filter-typecomprehension — A filter that is not bit
comprehension-zip-filter-exclusivecomprehension — zip together with a filter
comprehension-zip-scan-exclusivecomprehension — zip together with scan
connection-clause-targetconnection — A clause part that names the wrong kind of declaration
connection-directionalityconnection — A clause that runs against the connection it names
connection — A statement that names another component in its own role
listen — An arm receiving from the wrong end
connection-target-not-componentconnection — An endpoint that is not a component
group — Using a group where a component is required
const-self-referenceconst — A const that references itself
context-param-duplicate-typetransform — Two contextual parameters of one type
context-param-ref-scopetransform — A contextual reference outside a transform
cyclic-constconst — Consts that reference each other
cyclic-group-membershipgroup — A group that contains itself
cyclic-inheritancestruct — Inheritance that forms a cycle
cyclic-type-aliastype-alias — An alias defined in terms of itself
do-component-mismatchdo — Calling a protocol that runs on another component
do-tail-positiondo — A do tail with something after it
duplicate-annotation-paramannotation — Two parameters with one name
duplicate-contract-paramcontract — Declaring the same parameter twice
duplicate-declaration-namemodule — Two declarations with one name
component — Declaring the same component twice
duplicate-enum-memberenum — Two members with one name
duplicate-field-bindingliterals — A field bound twice
duplicate-field-namestruct — Declaring the same field twice
duplicate-group-membershipgroup — A component in two groups
group — The same member twice in one group
duplicate-import-elementimport — The same element twice in one import
duplicate-in-block-bindingin-block — One name in two in blocks
duplicate-modulemodule — Two files naming the same module
duplicate-paramfunction — Declaring the same parameter twice
duplicate-unique-annotationannotation — The same Unique values twice in one package
duplicate-variant-constructorvariant — Two constructors with one name
empty-enumenum — An enum with no members
empty-variantvariant — A variant with no constructors
enum-backing-type-mismatchenum — A member value the backing type does not accept
exch-from-to-requiredexch — An exchange that fixes only one endpoint
exch-into-target-not-varexch — An into target that is not a binding
exch-type-mismatchexch — Two halves that disagree about the message
extends-non-extensiblestruct — Extending a struct that is not extensible
extends-non-structstruct — Extending something that is not a struct
filter-body-typefold-map-filter-flatmap — A filter body that is not bit
filter-source-typefold-map-filter-flatmap — A filter over something that is neither an array nor an optional
flatmap-body-typefold-map-filter-flatmap — A flatmap body that is not a collection
flatmap-source-typefold-map-filter-flatmap — A flatmap over something that is neither an array nor an optional
fold-body-typefold-map-filter-flatmap — A fold body that is not the accumulator's type
fold-init-typefold-map-filter-flatmap — A fold initializer of the wrong type
fold-source-typefold-map-filter-flatmap — A fold over something that is not an array
giving-arg-counttransform — The wrong number of contextual arguments
giving-arg-typetransform — A contextual argument of the wrong type
giving-requiredtransform — A contextual transform called with no context available
giving-targettransform — giving on a call that takes no context
group-member-targetgroup — A member that is not a component or a group
illegal-shadowingblock-let-assert — Binding a name that is already in scope
import-conflictimport — An imported name this file already declares
import — The same element twice in one import
in-block-component-not-componentin-block — An in block for something that is not a component
incompatible-branch-typesarray — Elements of more than one type
if — Branches of two different numeric widths
if — Branches with no common type
match — Arms whose bodies have different types
incompatible-patternvariant — A pattern that binds the wrong number of payloads
match — A pattern the discriminee's type cannot match
inherited-field-collisionstruct — Redeclaring an inherited field
invalid-annotation-scopeannotation — A scope the language does not define
invalid-member-accesstuple — An element index the tuple does not have
literals — A field the struct does not declare
invalid-operand-typesarray — Concatenating arrays of different element types
operators — Operands the operator does not accept
local-protocol-component-not-componentlocal-protocol — Running a protocol in something that is not a component
loop-invariant-expressionloop — An invariant that does not begin with a bound variable
map-source-typefold-map-filter-flatmap — A map over something that is neither an array nor an optional
message-data-typelisten — An arm receiving a type that has no wire form
recv — Receiving into a variable that has no wire form
send — Sending a type that has no wire form
missing-fieldliterals — A field left unbound
newtype-field-count—
newtype-value-syntaxnewtype — Field bindings in place of a value
newtype-value-typenewtype — A wrapped value of the wrong type
non-exhaustive-matchmatch — A discriminee the arms do not cover
not-a-struct-or-newtypenewtype — A literal whose target is neither a struct nor a newtype
not-a-typeconst — Naming a const where a type is expected
type-alias — An alias naming something that is not a type
not-an-annotationannotation — Using something that is not an annotation
recv-assumption-typerecv — An assuming predicate that is not bit
reserved-builtin-namebuiltin-functions — Taking a built-in name for a declaration
send-predicate-typesend — A where predicate that is not bit
set-target-not-varlocal-protocol — Reassigning a let binding
sync-choice-guardchoice — A synchronized guard naming something other than a synchronized variable
choice — A synchronized guard that is not a condition
system-duplicate-componentsystem — Two protocols on the same component
system-protocol-not-localsystem — Listing something that is not a local protocol
transform-min-paramstransform — A transform with no parameters
transform-param-typetransform — A parameter that is not a message struct
transform-return-typetransform — A return type that is not a message struct
tuple-pattern-aritytuple — A pattern that binds the wrong number of elements
block-let-assert — A tuple pattern of the wrong length
type-mismatchconst — An initializer that does not match the declared type
enum — Using an enum value as its backing type
newtype — The underlying type in place of the newtype
optional — A payload of the wrong type
optional — An optional where the inner type is expected
primitives — A value of another primitive type
tuple — A tuple of a different arity
if — A condition that is not bit
try — Using the result where the plain value is expected
function — A body that is not the return type
fold-map-filter-flatmap — A flatmap body that is not a collection
unresolved-referencestruct — Naming an inherited field in an assertion
block-let-assert — Naming a binding outside the block that made it
transform — A contextual reference outside a transform
import — Importing a contract
import — Importing a module the project does not hold
import — Naming an element the module does not declare
choice — A guard naming another component's state
component — Naming a component that was never declared
in-block — Reading a binding from a component that is not involved
value-cast-source-typevalue-cast — A source that is not numeric
value-cast-target-typevalue-cast — A float64 narrowed to a float32
value-cast — A target that is not numeric
value-cast-wideningvalue-cast — A float64 narrowed to a float32
value-cast — A narrowing conversion asked for infallibly