pub enum IrError {
Show 61 variants
FunctionLocalClobbered(String, String),
InvalidMetadatum(String),
InvalidPhi,
MisplacedTerminator(String),
MissingBlock(String),
MissingTerminator(String),
ParseFailure(String, String),
RemoveMissingBlock(String),
ValueNotFound(String),
VerifyAccessElementInconsistentTypes,
VerifyAccessElementOnNonArray,
VerifyAccessElementNonIntIndex,
VerifyAccessValueInconsistentTypes,
VerifyAccessValueInvalidIndices,
VerifyAccessValueOnNonStruct,
VerifyArgumentValueIsNotArgument(String),
VerifyAddrOfUnknownSourceType,
VerifyAddrOfCopyType,
VerifyBitcastUnknownSourceType,
VerifyBitcastFromNonCopyType(String),
VerifyBitcastToNonCopyType(String),
VerifyBitcastBetweenInvalidTypes(String, String),
VerifyBinaryOpIncorrectArgType,
VerifyBranchToMissingBlock(String),
VerifyBranchParamsMismatch,
VerifyCallArgTypeMismatch(String),
VerifyCallToMissingFunction(String),
VerifyCmpBadTypes(String, String),
VerifyCmpTypeMismatch(String, String),
VerifyCmpUnknownTypes,
VerifyConditionExprNotABool,
VerifyContractCallBadTypes(String),
VerifyGetNonExistentPointer,
VerifyInsertElementOfIncorrectType,
VerifyInsertValueOfIncorrectType,
VerifyIntToPtrFromNonIntegerType(String),
VerifyIntToPtrToCopyType(String),
VerifyIntToPtrUnknownSourceType,
VerifyLoadFromNonPointer,
VerifyMemcopyNonExistentPointer,
VerifyMismatchedReturnTypes(String),
VerifyBlockArgMalformed,
VerifyPtrCastFromNonPointer,
VerifyPtrCastToNonPointer,
VerifyReturnRefTypeValue(String, String),
VerifyStateAccessNumOfSlots,
VerifyStateKeyBadType,
VerifyStateDestBadType(String),
VerifyStoreMismatchedTypes,
VerifyStoreNonExistentPointer,
VerifyStoreToNonPointer,
VerifyUntypedValuePassedToFunction,
VerifyInvalidGtfIndexType,
VerifyLogId,
VerifyMismatchedLoggedTypes,
VerifyRevertCodeBadType,
VerifySmoRecipientBadType,
VerifySmoBadRecipientAndMessageType,
VerifySmoMessageSize,
VerifySmoCoins,
VerifySmoOutputIndex,
}
Expand description
These errors are for internal IR failures, not designed to be useful to a Sway developer, but
more for users of the sway-ir
crate, i.e., compiler developers.
XXX They’re not very rich and could do with a little more verbosity.
Variants§
FunctionLocalClobbered(String, String)
InvalidMetadatum(String)
InvalidPhi
MisplacedTerminator(String)
MissingBlock(String)
MissingTerminator(String)
ParseFailure(String, String)
RemoveMissingBlock(String)
ValueNotFound(String)
VerifyAccessElementInconsistentTypes
VerifyAccessElementOnNonArray
VerifyAccessElementNonIntIndex
VerifyAccessValueInconsistentTypes
VerifyAccessValueInvalidIndices
VerifyAccessValueOnNonStruct
VerifyArgumentValueIsNotArgument(String)
VerifyAddrOfUnknownSourceType
VerifyAddrOfCopyType
VerifyBitcastUnknownSourceType
VerifyBitcastFromNonCopyType(String)
VerifyBitcastToNonCopyType(String)
VerifyBitcastBetweenInvalidTypes(String, String)
VerifyBinaryOpIncorrectArgType
VerifyBranchToMissingBlock(String)
VerifyBranchParamsMismatch
VerifyCallArgTypeMismatch(String)
VerifyCallToMissingFunction(String)
VerifyCmpBadTypes(String, String)
VerifyCmpTypeMismatch(String, String)
VerifyCmpUnknownTypes
VerifyConditionExprNotABool
VerifyContractCallBadTypes(String)
VerifyGetNonExistentPointer
VerifyInsertElementOfIncorrectType
VerifyInsertValueOfIncorrectType
VerifyIntToPtrFromNonIntegerType(String)
VerifyIntToPtrToCopyType(String)
VerifyIntToPtrUnknownSourceType
VerifyLoadFromNonPointer
VerifyMemcopyNonExistentPointer
VerifyMismatchedReturnTypes(String)
VerifyBlockArgMalformed
VerifyPtrCastFromNonPointer
VerifyPtrCastToNonPointer
VerifyReturnRefTypeValue(String, String)
VerifyStateAccessNumOfSlots
VerifyStateKeyBadType
VerifyStateDestBadType(String)
VerifyStoreMismatchedTypes
VerifyStoreNonExistentPointer
VerifyStoreToNonPointer
VerifyUntypedValuePassedToFunction
VerifyInvalidGtfIndexType
VerifyLogId
VerifyMismatchedLoggedTypes
VerifyRevertCodeBadType
VerifySmoRecipientBadType
VerifySmoBadRecipientAndMessageType
VerifySmoMessageSize
VerifySmoCoins
VerifySmoOutputIndex
Trait Implementations§
source§impl Error for IrError
impl Error for IrError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl RefUnwindSafe for IrError
impl Send for IrError
impl Sync for IrError
impl Unpin for IrError
impl UnwindSafe for IrError
Blanket Implementations§
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
source§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.