@@ -634,7 +634,7 @@ impl Evaluator<'_> {
634634 addr = addr. offset ( ty_size * offset) ;
635635 }
636636 & ProjectionElem :: Subslice { from, to } => {
637- let inner_ty = match & ty. data ( Interner ) . kind {
637+ let inner_ty = match & ty. kind ( Interner ) {
638638 TyKind :: Array ( inner, _) | TyKind :: Slice ( inner) => inner. clone ( ) ,
639639 _ => TyKind :: Error . intern ( Interner ) ,
640640 } ;
@@ -793,7 +793,7 @@ impl Evaluator<'_> {
793793 . iter ( )
794794 . map ( |it| self . operand_ty_and_eval ( it, & mut locals) )
795795 . collect :: < Result < Vec < _ > > > ( ) ?;
796- let stack_frame = match & fn_ty. data ( Interner ) . kind {
796+ let stack_frame = match & fn_ty. kind ( Interner ) {
797797 TyKind :: Function ( _) => {
798798 let bytes = self . eval_operand ( func, & mut locals) ?;
799799 self . exec_fn_pointer (
@@ -1255,7 +1255,7 @@ impl Evaluator<'_> {
12551255 PointerCast :: ReifyFnPointer | PointerCast :: ClosureFnPointer ( _) => {
12561256 let current_ty = self . operand_ty ( operand, locals) ?;
12571257 if let TyKind :: FnDef ( _, _) | TyKind :: Closure ( _, _) =
1258- & current_ty. data ( Interner ) . kind
1258+ & current_ty. kind ( Interner )
12591259 {
12601260 let id = self . vtable_map . id ( current_ty) ;
12611261 let ptr_size = self . ptr_size ( ) ;
@@ -1408,8 +1408,8 @@ impl Evaluator<'_> {
14081408 addr : Interval ,
14091409 ) -> Result < IntervalOrOwned > {
14101410 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 ) {
14131413 TyKind :: Array ( _, size) => {
14141414 let len = match try_const_usize ( self . db , size) {
14151415 None => {
@@ -1435,7 +1435,7 @@ impl Evaluator<'_> {
14351435 r. extend ( vtable. to_le_bytes ( ) . into_iter ( ) ) ;
14361436 Owned ( r)
14371437 }
1438- TyKind :: Adt ( id, target_subst) => match & current_ty. data ( Interner ) . kind {
1438+ TyKind :: Adt ( id, target_subst) => match & current_ty. kind ( Interner ) {
14391439 TyKind :: Adt ( current_id, current_subst) => {
14401440 if id != current_id {
14411441 not_supported ! ( "unsizing struct with different type" ) ;
@@ -1931,7 +1931,7 @@ impl Evaluator<'_> {
19311931 ) -> Result < Option < StackFrame > > {
19321932 let id = from_bytes ! ( usize , bytes. get( self ) ?) ;
19331933 let next_ty = self . vtable_map . ty ( id) ?. clone ( ) ;
1934- match & next_ty. data ( Interner ) . kind {
1934+ match & next_ty. kind ( Interner ) {
19351935 TyKind :: FnDef ( def, generic_args) => {
19361936 self . exec_fn_def ( * def, generic_args, destination, args, & locals, target_bb, span)
19371937 }
@@ -2182,7 +2182,7 @@ impl Evaluator<'_> {
21822182 let size = self . size_of_sized ( & func_ty, locals, "self type of fn trait" ) ?;
21832183 func_data = Interval { addr : Address :: from_bytes ( func_data. get ( self ) ?) ?, size } ;
21842184 }
2185- match & func_ty. data ( Interner ) . kind {
2185+ match & func_ty. kind ( Interner ) {
21862186 TyKind :: FnDef ( def, subst) => {
21872187 return self . exec_fn_def (
21882188 * def,
0 commit comments