1
Fork 0

Rollup merge of #120801 - oli-obk:drop_recursion_ice, r=Nilstrieb

Avoid ICE in drop recursion check in case of invalid drop impls

fixes #120787
This commit is contained in:
Matthias Krüger 2024-02-08 20:35:01 +01:00 committed by GitHub
commit ed528515d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 28 additions and 6 deletions

View file

@ -1313,6 +1313,7 @@ impl<'tcx> PolyFnSig<'tcx> {
self.map_bound_ref_unchecked(|fn_sig| fn_sig.inputs())
}
#[inline]
#[track_caller]
pub fn input(&self, index: usize) -> ty::Binder<'tcx, Ty<'tcx>> {
self.map_bound_ref(|fn_sig| fn_sig.inputs()[index])
}