diff options
| author | bors <bors@rust-lang.org> | 2023-12-28 20:41:44 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-12-28 20:41:44 +0000 |
| commit | fb5ed726f72c6d16c788517c60ec00d4564b9348 (patch) | |
| tree | 5c45cd5eb94c4a4812a2701cc557fdbbe797ab26 /compiler/rustc_mir_dataflow/src | |
| parent | 3ee671095499d83ba18d510683fa2a784d7d2ad2 (diff) | |
| parent | e24da8ea197b4b6724aaf7b5a5a2de64bb3c7445 (diff) | |
| download | rust-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_mir_dataflow/src')
| -rw-r--r-- | compiler/rustc_mir_dataflow/src/elaborate_drops.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_mir_dataflow/src/move_paths/builder.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_mir_dataflow/src/elaborate_drops.rs b/compiler/rustc_mir_dataflow/src/elaborate_drops.rs index 958fa0d17cd..c9930565186 100644 --- a/compiler/rustc_mir_dataflow/src/elaborate_drops.rs +++ b/compiler/rustc_mir_dataflow/src/elaborate_drops.rs @@ -862,7 +862,7 @@ where // This should only happen for the self argument on the resume function. // It effectively only contains upvars until the coroutine transformation runs. // See librustc_body/transform/coroutine.rs for more details. - ty::Coroutine(_, args, _) => self.open_drop_for_tuple(args.as_coroutine().upvar_tys()), + ty::Coroutine(_, args) => self.open_drop_for_tuple(args.as_coroutine().upvar_tys()), ty::Tuple(fields) => self.open_drop_for_tuple(fields), ty::Adt(def, args) => self.open_drop_for_adt(*def, args), ty::Dynamic(..) => self.complete_drop(self.succ, self.unwind), diff --git a/compiler/rustc_mir_dataflow/src/move_paths/builder.rs b/compiler/rustc_mir_dataflow/src/move_paths/builder.rs index ccf3dc7941f..cae35765308 100644 --- a/compiler/rustc_mir_dataflow/src/move_paths/builder.rs +++ b/compiler/rustc_mir_dataflow/src/move_paths/builder.rs @@ -155,7 +155,7 @@ impl<'b, 'a, 'tcx, F: Fn(Ty<'tcx>) -> bool> Gatherer<'b, 'a, 'tcx, F> { | ty::FnPtr(_) | ty::Dynamic(_, _, _) | ty::Closure(_, _) - | ty::Coroutine(_, _, _) + | ty::Coroutine(_, _) | ty::CoroutineWitness(..) | ty::Never | ty::Tuple(_) @@ -177,7 +177,7 @@ impl<'b, 'a, 'tcx, F: Fn(Ty<'tcx>) -> bool> Gatherer<'b, 'a, 'tcx, F> { union_path.get_or_insert(base); } } - ty::Closure(_, _) | ty::Coroutine(_, _, _) | ty::Tuple(_) => (), + ty::Closure(_, _) | ty::Coroutine(_, _) | ty::Tuple(_) => (), ty::Bool | ty::Char | ty::Int(_) |
