Remove movability from TyKind::Coroutine
This commit is contained in:
parent
f4d794ea0b
commit
fcb42b42d6
84 changed files with 212 additions and 220 deletions
|
@ -1066,7 +1066,7 @@ fn build_upvar_field_di_nodes<'ll, 'tcx>(
|
|||
closure_or_coroutine_di_node: &'ll DIType,
|
||||
) -> SmallVec<&'ll DIType> {
|
||||
let (&def_id, up_var_tys) = match closure_or_coroutine_ty.kind() {
|
||||
ty::Coroutine(def_id, args, _) => (def_id, args.as_coroutine().prefix_tys()),
|
||||
ty::Coroutine(def_id, args) => (def_id, args.as_coroutine().prefix_tys()),
|
||||
ty::Closure(def_id, args) => (def_id, args.as_closure().upvar_tys()),
|
||||
_ => {
|
||||
bug!(
|
||||
|
|
|
@ -679,7 +679,7 @@ fn build_union_fields_for_direct_tag_coroutine<'ll, 'tcx>(
|
|||
};
|
||||
|
||||
let (coroutine_def_id, coroutine_args) = match coroutine_type_and_layout.ty.kind() {
|
||||
&ty::Coroutine(def_id, args, _) => (def_id, args.as_coroutine()),
|
||||
&ty::Coroutine(def_id, args) => (def_id, args.as_coroutine()),
|
||||
_ => unreachable!(),
|
||||
};
|
||||
|
||||
|
|
|
@ -336,7 +336,7 @@ pub fn build_coroutine_variant_struct_type_di_node<'ll, 'tcx>(
|
|||
let variant_layout = coroutine_type_and_layout.for_variant(cx, variant_index);
|
||||
|
||||
let coroutine_args = match coroutine_type_and_layout.ty.kind() {
|
||||
ty::Coroutine(_, args, _) => args.as_coroutine(),
|
||||
ty::Coroutine(_, args) => args.as_coroutine(),
|
||||
_ => unreachable!(),
|
||||
};
|
||||
|
||||
|
|
|
@ -135,7 +135,7 @@ pub(super) fn build_coroutine_di_node<'ll, 'tcx>(
|
|||
unique_type_id: UniqueTypeId<'tcx>,
|
||||
) -> DINodeCreationResult<'ll> {
|
||||
let coroutine_type = unique_type_id.expect_ty();
|
||||
let &ty::Coroutine(coroutine_def_id, _, _) = coroutine_type.kind() else {
|
||||
let &ty::Coroutine(coroutine_def_id, _) = coroutine_type.kind() else {
|
||||
bug!("build_coroutine_di_node() called with non-coroutine type: `{:?}`", coroutine_type)
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue