Skip to content

Commit

Permalink
Rollup merge of rust-lang#102088 - oli-obk:cleanups, r=bjorn3
Browse files Browse the repository at this point in the history
Fix wrongly refactored Lift impl

see rust-lang#101858 (comment)

r? ``@bjorn3``
  • Loading branch information
matthiaskrgr authored Sep 24, 2022
2 parents 1b1596c + 3e6c9e5 commit bf167e0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion compiler/rustc_middle/src/ty/structural_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
}
}

Expand Down

0 comments on commit bf167e0

Please sign in to comment.