11// The `(*.0).0` syntax of thiserror falsely triggers this clippy warning
22#![ allow( clippy:: explicit_auto_deref) ]
33
4- use crate :: stdlib:: prelude:: * ;
54use crate :: types:: builtin_name:: BuiltinName ;
5+ use crate :: { stdlib:: prelude:: * , Felt252 } ;
66
77use thiserror:: Error ;
88
9- use crate :: Felt252 ;
109use crate :: {
1110 types:: {
1211 errors:: math_errors:: MathError ,
@@ -80,12 +79,8 @@ pub enum VirtualMachineError {
8079 InvalidOpcode ( u128 ) ,
8180 #[ error( "Invalid opcode extension value: {0}" ) ]
8281 InvalidOpcodeExtension ( u128 ) ,
83- #[ error( "This is not implemented" ) ]
84- NotImplemented ,
8582 #[ error( "Inconsistent auto-deduction for {}, expected {}, got {:?}" , ( * . 0 ) . 0 , ( * . 0 ) . 1 , ( * . 0 ) . 2 ) ]
8683 InconsistentAutoDeduction ( Box < ( BuiltinName , MaybeRelocatable , Option < MaybeRelocatable > ) > ) ,
87- #[ error( "Invalid hint encoding at pc: {0}" ) ]
88- InvalidHintEncoding ( Box < MaybeRelocatable > ) ,
8984 #[ error( "Expected output builtin to be present" ) ]
9085 NoOutputBuiltin ,
9186 #[ error( "Expected range_check builtin to be present" ) ]
@@ -94,14 +89,10 @@ pub enum VirtualMachineError {
9489 NoSignatureBuiltin ,
9590 #[ error( "Expected {0} to be present" ) ]
9691 NoModBuiltin ( BuiltinName ) ,
97- #[ error( "Div out of range: 0 < {} <= {}" , ( * . 0 ) . 0 , ( * . 0 ) . 1 ) ]
98- OutOfValidRange ( Box < ( Felt252 , Felt252 ) > ) ,
9992 #[ error( "Failed to compare {} and {}, cant compare a relocatable to an integer value" , ( * . 0 ) . 0 , ( * . 0 ) . 1 ) ]
10093 DiffTypeComparison ( Box < ( MaybeRelocatable , MaybeRelocatable ) > ) ,
10194 #[ error( "Failed to compare {} and {}, cant compare two relocatable values of different segment indexes" , ( * . 0 ) . 0 , ( * . 0 ) . 1 ) ]
10295 DiffIndexComp ( Box < ( Relocatable , Relocatable ) > ) ,
103- #[ error( "Couldn't convert usize to u32" ) ]
104- NoneInMemoryRange ,
10596 #[ error( "Expected integer, found: {0:?}" ) ]
10697 ExpectedIntAtRange ( Box < Option < MaybeRelocatable > > ) ,
10798 #[ error( "Could not convert slice to array" ) ]
@@ -112,16 +103,10 @@ pub enum VirtualMachineError {
112103 NoImm ,
113104 #[ error( "Execution reached the end of the program. Requested remaining steps: {0}." ) ]
114105 EndOfProgram ( usize ) ,
115- #[ error( "Could not reach the end of the program. Executed steps: {0}." ) ]
116- StepsLimit ( u64 ) ,
117106 #[ error( "Could not reach the end of the program. RunResources has no remaining steps." ) ]
118107 UnfinishedExecution ,
119108 #[ error( "Current run is not finished" ) ]
120109 RunNotFinished ,
121- #[ error( "Invalid argument count, expected {} but got {}" , ( * . 0 ) . 0 , ( * . 0 ) . 1 ) ]
122- InvalidArgCount ( Box < ( usize , usize ) > ) ,
123- #[ error( "Couldn't parse prime: {0}" ) ]
124- CouldntParsePrime ( Box < str > ) ,
125110 #[ error( "{HINT_ERROR_STR}{}" , ( * . 0 ) . 1 ) ]
126111 Hint ( Box < ( usize , HintError ) > ) ,
127112 #[ error( "Unexpected Failure" ) ]
0 commit comments