File tree 1 file changed +6
-2
lines changed
src/librustc/mir/interpret
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,10 @@ impl<'tcx> Scalar {
103
103
ScalarMaybeUndef :: Scalar ( self ) . to_value_with_len ( len, cx)
104
104
}
105
105
106
+ pub fn to_value_with_vtable ( self , vtable : Pointer ) -> Value {
107
+ ScalarMaybeUndef :: Scalar ( self ) . to_value_with_vtable ( vtable)
108
+ }
109
+
106
110
pub fn ptr_signed_offset < C : HasDataLayout > ( self , i : i64 , cx : C ) -> EvalResult < ' tcx , Self > {
107
111
let layout = cx. data_layout ( ) ;
108
112
match self {
@@ -207,14 +211,14 @@ impl ScalarMaybeUndef {
207
211
}
208
212
209
213
pub fn to_value_with_len < C : HasDataLayout > ( self , len : u64 , cx : C ) -> Value {
210
- Value :: ScalarPair ( self . into ( ) , Scalar :: Bits {
214
+ Value :: ScalarPair ( self , Scalar :: Bits {
211
215
bits : len as u128 ,
212
216
size : cx. data_layout ( ) . pointer_size . bytes ( ) as u8 ,
213
217
} . into ( ) )
214
218
}
215
219
216
220
pub fn to_value_with_vtable ( self , vtable : Pointer ) -> Value {
217
- Value :: ScalarPair ( self . into ( ) , Scalar :: Ptr ( vtable) . into ( ) )
221
+ Value :: ScalarPair ( self , Scalar :: Ptr ( vtable) . into ( ) )
218
222
}
219
223
220
224
pub fn ptr_offset < C : HasDataLayout > ( self , i : Size , cx : C ) -> EvalResult < ' tcx , Self > {
You can’t perform that action at this time.
0 commit comments