Use let instead of match to get value of enum with single variant.
This commit is contained in:
parent
18c275b423
commit
e364c283fd
@ -824,11 +824,8 @@ fn find_vtable_types_for_unsizing<'tcx>(
|
||||
(&ty::Adt(source_adt_def, source_substs), &ty::Adt(target_adt_def, target_substs)) => {
|
||||
assert_eq!(source_adt_def, target_adt_def);
|
||||
|
||||
let kind = monomorphize::custom_coerce_unsize_info(tcx, source_ty, target_ty);
|
||||
|
||||
let coerce_index = match kind {
|
||||
CustomCoerceUnsized::Struct(i) => i,
|
||||
};
|
||||
let CustomCoerceUnsized::Struct(coerce_index) =
|
||||
monomorphize::custom_coerce_unsize_info(tcx, source_ty, target_ty);
|
||||
|
||||
let source_fields = &source_adt_def.non_enum_variant().fields;
|
||||
let target_fields = &target_adt_def.non_enum_variant().fields;
|
||||
|
Loading…
Reference in New Issue
Block a user