Diagnostics
Each of the 157 codes that sisu reports has a page here, with the explanation that sisu explain prints.
Variables and change
- E0001Assignment to something that cannot change
- E0013
varinstead oflet mut - E0019
mutparameter - E0021Assignment to something that is not a place
- E0022Assignment through
?. - E0074Assignment to a function
- E0078
muton_ - E0084
constinside a function - E0085Constant of a type that cannot be folded
- E0086Constant value not known at compile time
- E0087Constant that uses itself or a constant below it
- E0088Constant whose value would panic
- E0100Conversion that can fail, in a constant
- W0002Variable that is never reassigned
- W0011
whilecondition that nothing in the loop changes - W0014Local or parameter that nothing reads
Types and conversions
- E0009Integer literal too large for
i64 - E0030Type that does not exist
- E0031Function body without the value it returns
- E0032Value of the wrong type
- E0035
forover something that is not an array or a range - E0036
returnwithout a value - E0037
returnwith a value in a function that returns none - E0040Integer literal too large for
u8 - E0042
u8that is negated - E0043Expression without a value
- E0044Comparison of a value that is never
NonewithNone - E0045
isused to test forNone - E0047Comparison of values of different types
- E0048
??on a value that is not optional - E0049
?.on a value that is not optional - E0050A type that cannot be inferred
- E0054Conversion to the type the value already has
- E0059
printoreprintof something it cannot print - E0060
printoreprintof an array - E0061
printoreprintof an expression that never finishes - E0062Optional used as if it were present
- E0068Index of something that is not an array
- E0069
sumof an array that is not[i64]or[f64] - E0094Arithmetic on
char - E0098Value that cannot be interpolated
- E0103Float literal out of range for
f64 - E0104Integer literal not exactly an
f64 - E0105A type or a function used as a value
- E0111Precision on a value that is not an
f64 - E0137Type arguments that do not fit
- E0138Type that cannot be a type argument
- E0139Operator on a value of a type parameter
- E0140Instantiations that never end
- E0141
breakwith a value in a loop that has none - W0005Comparison with
f64.nan
Names and scope
- E0026Name taken by a built-in
- E0028Program without
main - E0029
mainwith a wrong signature - E0033Name that is not in scope
- E0034Name defined twice
- E0038
breakorcontinueoutside a loop - E0039Parameter name used twice
- E0052Call of a function that does not exist
- E0053Call with the wrong number of arguments
- E0055Labeled argument in a call
- E0079
_used as a value - E0080
_used as a name - E0082
breakorcontinuein a loop header - E0106Math written another way
- E0142Loop label that is also a name in scope
- E0143Loop label used by an enclosing loop
- E0144
breakorcontinuenaming no loop label around it - E0145Loop label on something that is not a loop
- W0001Unreachable code
- W0004Unused value
- W0008Loop label that is never used
- W0009
whilewith the conditiontrue - W0010Function that calls itself on every path
- W0012Function, method, class, enum or constant that no live code uses
- W0013Field that no live code reads, or variant that no live code builds
Classes and fields
- E0016
letin front of a field - E0017Method without
self - E0018
mut selfon a method - E0020
selfthat is not the first parameter - E0027Class that can never be constructed
- E0041
selfoutside a method - E0046
ison something that is not an object - E0056Constructor without every field
- E0057Method read as a field
- E0058Field called as a method
- E0063Field or method that does not exist
- E0064Constructor with more arguments than fields
- E0065Constructor argument without a label
- E0066Constructor that names its fields out of order
- E0067Array filled with one object
- E0070Method called as a function
- E0073Assignment to
self
Enums and match
- E0051
if letorwhile leton a value that is not an enum or optional - E0112Variant after a method
- E0113Variant name not capitalized
- E0114Payload labels mixed
- E0115Enum without variants
- E0116Local named like an enum
- E0117Variant without its enum
- E0118Unknown variant
- E0119Variant built the wrong way
- E0120Variant or method used as the other
- E0121Field access on an enum
- E0122An idiom of another language in an enum or
match - E0123A pattern written another language's way
- E0124
matchon a type it cannot take - E0125Upper-case name where no enum is expected
- E0126Constant in a pattern
- E0127Only a name here
- E0128Wrong number of sub-patterns
- E0129Name bound twice in one pattern
- E0130
matchthat does not cover every value - E0131
if letorwhile letthat always matches - E0133Arm split across lines
- E0134Interpolation in a string pattern
- E0135A range pattern that cannot match
- E0136Alternatives bind different names
- W0006Unreachable arm
Syntax
- E0002Line that starts with a binary
- - E0003Bracket that is never closed
- E0004
{on a line of its own - E0005
[that starts a line inside brackets - E0006
elseon a line of its own - E0007Closing bracket that does not match
- E0008
_outside digits - E0010Character that Sisu does not use
- E0011Token where something else belongs
- E0015
,between fields, variants or arms - E0023Range outside
forand patterns - E0024Chained
==,!=oris - E0025Comparison chain that turns around
- E0071Nesting too deep
- E0072Source that is not valid UTF-8
- E0075Base prefix in upper case
- E0076Base prefix without digits
- E0077Digit outside the literal's base
- E0081Block that stands alone as a statement
- E0083Word reserved for a later version
- E0089Unknown escape
- E0090Malformed
\uescape - E0091Escape that is not a Unicode scalar value
- E0092
charliteral that is not one code point - E0093Literal that is not closed
- E0095
}in a string - E0096Empty interpolation
- E0097Comment inside an interpolation
- E0099
todowritten another way - E0101Float without digits on both sides of
. - E0102Exponent without digits
- E0107
** - E0108Malformed format spec
- E0109Unsupported format spec
- E0110Format spec width or precision above its limit
- E0132Range written another language's way
- W0003
todoleft in the program - W0007Unnecessary
;
Sisu