Skip to content

Commit bf167e0

Browse files
authored
Rollup merge of rust-lang#102088 - oli-obk:cleanups, r=bjorn3
Fix wrongly refactored Lift impl see rust-lang#101858 (comment) r? ``@bjorn3``
2 parents 1b1596c + 3e6c9e5 commit bf167e0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compiler/rustc_middle/src/ty/structural_impls.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,10 @@ impl<'tcx, A: Lift<'tcx>, B: Lift<'tcx>, C: Lift<'tcx>> Lift<'tcx> for (A, B, C)
272272
impl<'tcx, T: Lift<'tcx>> Lift<'tcx> for Option<T> {
273273
type Lifted = Option<T::Lifted>;
274274
fn lift_to_tcx(self, tcx: TyCtxt<'tcx>) -> Option<Self::Lifted> {
275-
tcx.lift(self?).map(Some)
275+
Some(match self {
276+
Some(x) => Some(tcx.lift(x)?),
277+
None => None,
278+
})
276279
}
277280
}
278281

0 commit comments

Comments
 (0)