about summary refs log tree commit diff
path: root/compiler/rustc_ty_utils/src/instance.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-12-28 20:41:44 +0000
committerbors <bors@rust-lang.org>2023-12-28 20:41:44 +0000
commitfb5ed726f72c6d16c788517c60ec00d4564b9348 (patch)
tree5c45cd5eb94c4a4812a2701cc557fdbbe797ab26 /compiler/rustc_ty_utils/src/instance.rs
parent3ee671095499d83ba18d510683fa2a784d7d2ad2 (diff)
parente24da8ea197b4b6724aaf7b5a5a2de64bb3c7445 (diff)
downloadrust-fb5ed726f72c6d16c788517c60ec00d4564b9348.tar.gz
rust-fb5ed726f72c6d16c788517c60ec00d4564b9348.zip
Auto merge of #119174 - compiler-errors:movability, r=cjgillot
Remove movability from `TyKind::Coroutine`

There's no reason to store movability in the generator struct directly. It is computed from the HIR, and can be pulled into a query to access when necessary.
Diffstat (limited to 'compiler/rustc_ty_utils/src/instance.rs')
-rw-r--r--compiler/rustc_ty_utils/src/instance.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_ty_utils/src/instance.rs b/compiler/rustc_ty_utils/src/instance.rs
index 42db43caf9f..81d5304b812 100644
--- a/compiler/rustc_ty_utils/src/instance.rs
+++ b/compiler/rustc_ty_utils/src/instance.rs
@@ -246,7 +246,7 @@ fn resolve_associated_item<'tcx>(
                     })
                 }
             } else if Some(trait_ref.def_id) == lang_items.future_trait() {
-                let ty::Coroutine(coroutine_def_id, args, _) = *rcvr_args.type_at(0).kind() else {
+                let ty::Coroutine(coroutine_def_id, args) = *rcvr_args.type_at(0).kind() else {
                     bug!()
                 };
                 if Some(trait_item_id) == tcx.lang_items().future_poll_fn() {
@@ -259,7 +259,7 @@ fn resolve_associated_item<'tcx>(
                     Some(Instance::new(trait_item_id, rcvr_args))
                 }
             } else if Some(trait_ref.def_id) == lang_items.iterator_trait() {
-                let ty::Coroutine(coroutine_def_id, args, _) = *rcvr_args.type_at(0).kind() else {
+                let ty::Coroutine(coroutine_def_id, args) = *rcvr_args.type_at(0).kind() else {
                     bug!()
                 };
                 if Some(trait_item_id) == tcx.lang_items().next_fn() {
@@ -272,7 +272,7 @@ fn resolve_associated_item<'tcx>(
                     Some(Instance::new(trait_item_id, rcvr_args))
                 }
             } else if Some(trait_ref.def_id) == lang_items.async_iterator_trait() {
-                let ty::Coroutine(coroutine_def_id, args, _) = *rcvr_args.type_at(0).kind() else {
+                let ty::Coroutine(coroutine_def_id, args) = *rcvr_args.type_at(0).kind() else {
                     bug!()
                 };
 
@@ -287,7 +287,7 @@ fn resolve_associated_item<'tcx>(
                 // `AsyncIterator::poll_next` is generated by the compiler.
                 Some(Instance { def: ty::InstanceDef::Item(coroutine_def_id), args })
             } else if Some(trait_ref.def_id) == lang_items.coroutine_trait() {
-                let ty::Coroutine(coroutine_def_id, args, _) = *rcvr_args.type_at(0).kind() else {
+                let ty::Coroutine(coroutine_def_id, args) = *rcvr_args.type_at(0).kind() else {
                     bug!()
                 };
                 if cfg!(debug_assertions) && tcx.item_name(trait_item_id) != sym::resume {