@@ -634,7 +634,7 @@ impl Evaluator<'_> {
634
634
addr = addr. offset ( ty_size * offset) ;
635
635
}
636
636
& ProjectionElem :: Subslice { from, to } => {
637
- let inner_ty = match & ty. data ( Interner ) . kind {
637
+ let inner_ty = match & ty. kind ( Interner ) {
638
638
TyKind :: Array ( inner, _) | TyKind :: Slice ( inner) => inner. clone ( ) ,
639
639
_ => TyKind :: Error . intern ( Interner ) ,
640
640
} ;
@@ -793,7 +793,7 @@ impl Evaluator<'_> {
793
793
. iter ( )
794
794
. map ( |it| self . operand_ty_and_eval ( it, & mut locals) )
795
795
. collect :: < Result < Vec < _ > > > ( ) ?;
796
- let stack_frame = match & fn_ty. data ( Interner ) . kind {
796
+ let stack_frame = match & fn_ty. kind ( Interner ) {
797
797
TyKind :: Function ( _) => {
798
798
let bytes = self . eval_operand ( func, & mut locals) ?;
799
799
self . exec_fn_pointer (
@@ -1255,7 +1255,7 @@ impl Evaluator<'_> {
1255
1255
PointerCast :: ReifyFnPointer | PointerCast :: ClosureFnPointer ( _) => {
1256
1256
let current_ty = self . operand_ty ( operand, locals) ?;
1257
1257
if let TyKind :: FnDef ( _, _) | TyKind :: Closure ( _, _) =
1258
- & current_ty. data ( Interner ) . kind
1258
+ & current_ty. kind ( Interner )
1259
1259
{
1260
1260
let id = self . vtable_map . id ( current_ty) ;
1261
1261
let ptr_size = self . ptr_size ( ) ;
@@ -1408,8 +1408,8 @@ impl Evaluator<'_> {
1408
1408
addr : Interval ,
1409
1409
) -> Result < IntervalOrOwned > {
1410
1410
use IntervalOrOwned :: * ;
1411
- Ok ( match & target_ty. data ( Interner ) . kind {
1412
- TyKind :: Slice ( _) => match & current_ty. data ( Interner ) . kind {
1411
+ Ok ( match & target_ty. kind ( Interner ) {
1412
+ TyKind :: Slice ( _) => match & current_ty. kind ( Interner ) {
1413
1413
TyKind :: Array ( _, size) => {
1414
1414
let len = match try_const_usize ( self . db , size) {
1415
1415
None => {
@@ -1435,7 +1435,7 @@ impl Evaluator<'_> {
1435
1435
r. extend ( vtable. to_le_bytes ( ) . into_iter ( ) ) ;
1436
1436
Owned ( r)
1437
1437
}
1438
- TyKind :: Adt ( id, target_subst) => match & current_ty. data ( Interner ) . kind {
1438
+ TyKind :: Adt ( id, target_subst) => match & current_ty. kind ( Interner ) {
1439
1439
TyKind :: Adt ( current_id, current_subst) => {
1440
1440
if id != current_id {
1441
1441
not_supported ! ( "unsizing struct with different type" ) ;
@@ -1931,7 +1931,7 @@ impl Evaluator<'_> {
1931
1931
) -> Result < Option < StackFrame > > {
1932
1932
let id = from_bytes ! ( usize , bytes. get( self ) ?) ;
1933
1933
let next_ty = self . vtable_map . ty ( id) ?. clone ( ) ;
1934
- match & next_ty. data ( Interner ) . kind {
1934
+ match & next_ty. kind ( Interner ) {
1935
1935
TyKind :: FnDef ( def, generic_args) => {
1936
1936
self . exec_fn_def ( * def, generic_args, destination, args, & locals, target_bb, span)
1937
1937
}
@@ -2182,7 +2182,7 @@ impl Evaluator<'_> {
2182
2182
let size = self . size_of_sized ( & func_ty, locals, "self type of fn trait" ) ?;
2183
2183
func_data = Interval { addr : Address :: from_bytes ( func_data. get ( self ) ?) ?, size } ;
2184
2184
}
2185
- match & func_ty. data ( Interner ) . kind {
2185
+ match & func_ty. kind ( Interner ) {
2186
2186
TyKind :: FnDef ( def, subst) => {
2187
2187
return self . exec_fn_def (
2188
2188
* def,
0 commit comments