diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:48 +0000 |
commit | ef24de24a82fe681581cc130f342363c47c0969a (patch) | |
tree | 0d494f7e1a38b95c92426f58fe6eaa877303a86c /compiler/rustc_ty_utils/src/needs_drop.rs | |
parent | Releasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip |
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'compiler/rustc_ty_utils/src/needs_drop.rs')
-rw-r--r-- | compiler/rustc_ty_utils/src/needs_drop.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_ty_utils/src/needs_drop.rs b/compiler/rustc_ty_utils/src/needs_drop.rs index 51a6d6235..67ccfe7e7 100644 --- a/compiler/rustc_ty_utils/src/needs_drop.rs +++ b/compiler/rustc_ty_utils/src/needs_drop.rs @@ -134,9 +134,9 @@ where for component in components { match *component.kind() { - // The information required to determine whether a generator has drop is + // The information required to determine whether a coroutine has drop is // computed on MIR, while this very method is used to build MIR. - // To avoid cycles, we consider that generators always require drop. + // To avoid cycles, we consider that coroutines always require drop. // // HACK: Because we erase regions contained in the coroutine witness, we // have to conservatively assume that every region captured by the @@ -145,15 +145,15 @@ where // for the coroutine witness and check whether any of the contained types // need to be dropped, and only require the captured types to be live // if they do. - ty::Generator(_, args, _) => { + ty::Coroutine(_, args, _) => { if self.reveal_coroutine_witnesses { - queue_type(self, args.as_generator().witness()); + queue_type(self, args.as_coroutine().witness()); } else { return Some(Err(AlwaysRequiresDrop)); } } - ty::GeneratorWitness(def_id, args) => { - if let Some(witness) = tcx.mir_generator_witnesses(def_id) { + ty::CoroutineWitness(def_id, args) => { + if let Some(witness) = tcx.mir_coroutine_witnesses(def_id) { self.reveal_coroutine_witnesses = true; for field_ty in &witness.field_tys { queue_type( |