Rollup merge of #102088 - oli-obk:cleanups, r=bjorn3

Fix wrongly refactored Lift impl

see https://github.com/rust-lang/rust/pull/101858#issuecomment-1252713639

r? ``@bjorn3``
This commit is contained in:
Matthias Krüger 2022-09-24 14:29:53 +02:00 committed by GitHub
commit bf167e0ae5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -272,7 +272,10 @@ impl<'tcx, A: Lift<'tcx>, B: Lift<'tcx>, C: Lift<'tcx>> Lift<'tcx> for (A, B, C)
impl<'tcx, T: Lift<'tcx>> Lift<'tcx> for Option<T> {
type Lifted = Option<T::Lifted>;
fn lift_to_tcx(self, tcx: TyCtxt<'tcx>) -> Option<Self::Lifted> {
tcx.lift(self?).map(Some)
Some(match self {
Some(x) => Some(tcx.lift(x)?),
None => None,
})
}
}