mentioned items: also handle vtables

This commit is contained in:
Ralf Jung 2024-03-17 13:28:31 +01:00
parent ee4b758161
commit 347ca50bc8
6 changed files with 106 additions and 44 deletions

View file

@ -319,7 +319,11 @@ impl<'tcx> CoroutineInfo<'tcx> {
pub enum MentionedItem<'tcx> {
Fn(DefId, GenericArgsRef<'tcx>),
Drop(Ty<'tcx>),
// FIXME: add Vtable { source_ty: Ty<'tcx>, target_ty: Ty<'tcx> },
/// Unsizing casts might require vtables, so we have to record them.
UnsizeCast {
source_ty: Ty<'tcx>,
target_ty: Ty<'tcx>,
},
// FIXME: do we have to add closures?
}