pub enum CodegenErrorKind {
Show 55 variants
LockingError,
StoragePointersNotDerived,
InvalidMacroStatement,
MissingArgumentDefinition(String),
MissingMacroDefinition(String),
MissingFunctionInterface(String),
MissingEventInterface(String),
MissingConstantDefinition(String),
StringConstantNotBytes(String),
MissingErrorDefinition(String),
AbiGenerationFailure,
UnmatchedJumpLabels(Vec<String>),
IOError(String),
UnkownArgcallType,
MissingMacroInvocation(String),
InvalidMacroInvocation(String),
InvalidArgumentCount(String, usize, usize),
UsizeConversion(String),
InvalidArguments(String),
InvalidMacroArgumentType(String),
InvalidHex(String),
InvalidTableStatement(String),
InvalidCodeLength(usize),
TestInvocation(String),
InvalidConstructorArgs(String),
ArgsStartOutsideConstructor,
MissingTableSize(String),
UnsupportedBuiltinFunction(String),
RuntimeSizeNotComputed,
CodesizeRuntimeInCodeTable,
CodesizeNotConverged(usize),
UnsupportedStatementType(String),
DuplicateLabelInScope(String),
DuplicateLabelAcrossSiblings(String),
DuplicateTableEmbedding(String),
JumpTargetTooLarge {
label: String,
target: usize,
opcode: String,
},
CircularMacroInvocation(String),
CircularConstantDependency(String),
RecursionDepthExceeded(usize),
UndefinedConstant(String),
InvalidConstantExpression,
ArithmeticOverflow,
ArithmeticUnderflow,
DivisionByZero,
ArgCallInConstantExpression(String),
InvalidOpcodeForEVMVersion(String, String, String),
InvalidLoopStep,
LoopIterationLimitExceeded(usize),
AssertPcFailed(usize, usize),
ArgResolutionLimitExceeded(String, usize),
BubbleArgLimitExceeded(String, usize),
ContractSizeLimitExceeded(usize, usize),
InitcodeSizeLimitExceeded(usize, usize),
InvalidOpcodeOperand(String),
OffsetExceedsTwoBytes(String, usize),
}Expand description
The Code Generation Error Kind
Variants§
LockingError
Locking Error
StoragePointersNotDerived
Storage Pointers Not Derived
InvalidMacroStatement
Invalid Macro Body Statement
MissingArgumentDefinition(String)
The Argument Definition is Missing
MissingMacroDefinition(String)
The Macro Definition is Missing
MissingFunctionInterface(String)
The Function Interface is Missing
MissingEventInterface(String)
The Event Interface is Missing
MissingConstantDefinition(String)
Missing Constant Definition
StringConstantNotBytes(String)
String constant used directly instead of with __BYTES builtin
MissingErrorDefinition(String)
Missing Error Definition
AbiGenerationFailure
Abi Generation Failure
UnmatchedJumpLabels(Vec<String>)
Unmatched Jump
IOError(String)
An IO Error
UnkownArgcallType
ArgCall has an unknown type
MissingMacroInvocation(String)
Missing Macro Invocation
InvalidMacroInvocation(String)
Missing Macro Definition for Invocation
InvalidArgumentCount(String, usize, usize)
Invalid Argument Count with macro name, expected and actual
UsizeConversion(String)
Conversion Error for usize
InvalidArguments(String)
Invalid Arguments
InvalidMacroArgumentType(String)
Invalid Macro Argument Type (e.g., cannot invoke __NOOP as a macro)
InvalidHex(String)
Invalid Hex String
InvalidTableStatement(String)
Invalid Table Statement
InvalidCodeLength(usize)
Invalid Code Length
TestInvocation(String)
Test Invocation
InvalidConstructorArgs(String)
Constructor arguments that do not match the declared constructor or cannot be read
ArgsStartOutsideConstructor
__argsstart() outside the constructor, where constructor arguments do not exist
MissingTableSize(String)
Missing Table Size
UnsupportedBuiltinFunction(String)
Unsupported Builtin Function
RuntimeSizeNotComputed
__codesize(RUNTIME) referenced before the runtime size has been computed (e.g. when
the constructor is compiled in isolation without first generating MAIN).
CodesizeRuntimeInCodeTable
__codesize(RUNTIME) referenced inside a code table. Code tables contribute to the
runtime size, so embedding the runtime size inside one creates a circular dependency.
CodesizeNotConverged(usize)
Codegen failed to converge on stable __codesize values within the iteration cap.
UnsupportedStatementType(String)
Unsupported Statement Type
DuplicateLabelInScope(String)
Duplicate Label in Same Scope
DuplicateLabelAcrossSiblings(String)
Duplicate label defined in multiple sibling scopes When a label is not found in current scope, fallback searches siblings - but will always find the first definition, making subsequent ones unreachable
DuplicateTableEmbedding(String)
Duplicate Table Embedding
JumpTargetTooLarge
Jump target is too large for the specified opcode
Fields
CircularMacroInvocation(String)
Circular macro invocation detected
CircularConstantDependency(String)
Circular constant dependency detected
RecursionDepthExceeded(usize)
Recursion depth limit exceeded
UndefinedConstant(String)
Undefined constant in expression
InvalidConstantExpression
Invalid constant expression (contains runtime elements)
ArithmeticOverflow
Arithmetic overflow in constant expression
ArithmeticUnderflow
Arithmetic underflow in constant expression
DivisionByZero
Division by zero in constant expression
ArgCallInConstantExpression(String)
ArgCall in constant expression (requires macro invocation context)
InvalidOpcodeForEVMVersion(String, String, String)
Invalid opcode for EVM version (opcode, required_version, current_version)
InvalidLoopStep
Invalid loop step value (step cannot be zero)
LoopIterationLimitExceeded(usize)
Loop iteration limit exceeded (contains max limit)
AssertPcFailed(usize, usize)
PC (program counter) assertion failed (expected, actual)
ArgResolutionLimitExceeded(String, usize)
Exceeded maximum iterations when resolving argument references through the scope chain First parameter is the argument name, second is the maximum allowed iterations
BubbleArgLimitExceeded(String, usize)
Exceeded maximum iterations in bubble_arg_call when bubbling up through nested macro calls First parameter is the argument name, second is the maximum allowed iterations
ContractSizeLimitExceeded(usize, usize)
Runtime bytecode exceeds the contract size limit of the target EVM version (size, limit)
InitcodeSizeLimitExceeded(usize, usize)
Deployment bytecode exceeds the initcode size limit of the target EVM version (size, limit)
InvalidOpcodeOperand(String)
An opcode operand resolved to a value the opcode cannot encode (description)
OffsetExceedsTwoBytes(String, usize)
A bytecode offset that is stored in a fixed 2-byte field exceeds 0xffff (what, offset)
Trait Implementations§
Source§impl Clone for CodegenErrorKind
impl Clone for CodegenErrorKind
Source§impl Debug for CodegenErrorKind
impl Debug for CodegenErrorKind
impl Eq for CodegenErrorKind
Source§impl PartialEq for CodegenErrorKind
impl PartialEq for CodegenErrorKind
impl StructuralPartialEq for CodegenErrorKind
Auto Trait Implementations§
impl Freeze for CodegenErrorKind
impl RefUnwindSafe for CodegenErrorKind
impl Send for CodegenErrorKind
impl Sync for CodegenErrorKind
impl Unpin for CodegenErrorKind
impl UnsafeUnpin for CodegenErrorKind
impl UnwindSafe for CodegenErrorKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<S, T> Upcast<T> for S
impl<S, T> Upcast<T> for S
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 72 bytes
Size for each variant:
LockingError: 0 bytesStoragePointersNotDerived: 0 bytesInvalidMacroStatement: 0 bytesMissingArgumentDefinition: 32 bytesMissingMacroDefinition: 32 bytesMissingFunctionInterface: 32 bytesMissingEventInterface: 32 bytesMissingConstantDefinition: 32 bytesStringConstantNotBytes: 32 bytesMissingErrorDefinition: 32 bytesAbiGenerationFailure: 0 bytesUnmatchedJumpLabels: 32 bytesIOError: 32 bytesUnkownArgcallType: 0 bytesMissingMacroInvocation: 32 bytesInvalidMacroInvocation: 32 bytesInvalidArgumentCount: 48 bytesUsizeConversion: 32 bytesInvalidArguments: 32 bytesInvalidMacroArgumentType: 32 bytesInvalidHex: 32 bytesInvalidTableStatement: 32 bytesInvalidCodeLength: 16 bytesTestInvocation: 32 bytesInvalidConstructorArgs: 32 bytesArgsStartOutsideConstructor: 0 bytesMissingTableSize: 32 bytesUnsupportedBuiltinFunction: 32 bytesRuntimeSizeNotComputed: 0 bytesCodesizeRuntimeInCodeTable: 0 bytesCodesizeNotConverged: 16 bytesUnsupportedStatementType: 32 bytesDuplicateLabelInScope: 32 bytesDuplicateLabelAcrossSiblings: 32 bytesDuplicateTableEmbedding: 32 bytesJumpTargetTooLarge: 64 bytesCircularMacroInvocation: 32 bytesCircularConstantDependency: 32 bytesRecursionDepthExceeded: 16 bytesUndefinedConstant: 32 bytesInvalidConstantExpression: 0 bytesArithmeticOverflow: 0 bytesArithmeticUnderflow: 0 bytesDivisionByZero: 0 bytesArgCallInConstantExpression: 32 bytesInvalidOpcodeForEVMVersion: 72 bytesInvalidLoopStep: 0 bytesLoopIterationLimitExceeded: 16 bytesAssertPcFailed: 24 bytesArgResolutionLimitExceeded: 40 bytesBubbleArgLimitExceeded: 40 bytesContractSizeLimitExceeded: 24 bytesInitcodeSizeLimitExceeded: 24 bytesInvalidOpcodeOperand: 32 bytesOffsetExceedsTwoBytes: 40 bytes