1
Fork 0

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

This commit is contained in:
Oli Scherer 2024-02-08 17:33:04 +00:00
parent 1280928a99
commit ad511ef92e
4 changed files with 28 additions and 6 deletions

View file

@ -1312,6 +1312,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])
}