diff --git a/compiler/rustc_const_eval/src/const_eval/type_info.rs b/compiler/rustc_const_eval/src/const_eval/type_info.rs index 0df2e9b5fd0ae..320bdd664780e 100644 --- a/compiler/rustc_const_eval/src/const_eval/type_info.rs +++ b/compiler/rustc_const_eval/src/const_eval/type_info.rs @@ -62,23 +62,9 @@ impl<'tcx> InterpCx<'tcx, CompileTimeMachine<'tcx>> { match field.name { sym::kind => { let variant_index = match ty.kind() { - ty::Tuple(fields) => { - let (variant, variant_place) = + ty::Tuple(_) => { + let (variant, _variant_place) = self.project_downcast_named(&field_dest, sym::Tuple)?; - // project to the single tuple variant field of `type_info::Tuple` struct type - let tuple_place = self.project_field(&variant_place, FieldIdx::ZERO)?; - assert_eq!( - 1, - tuple_place - .layout() - .ty - .ty_adt_def() - .unwrap() - .non_enum_variant() - .fields - .len() - ); - self.write_tuple_type_info(tuple_place, fields, ty)?; variant } ty::Array(_, _) => {