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 23, 2022
2 parents 0290b1d + 3e6c9e5 commit a69855c
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 a69855c

Please sign in to comment.