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:
commit
bf167e0ae5
1 changed files with 4 additions and 1 deletions
|
@ -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> {
|
impl<'tcx, T: Lift<'tcx>> Lift<'tcx> for Option<T> {
|
||||||
type Lifted = Option<T::Lifted>;
|
type Lifted = Option<T::Lifted>;
|
||||||
fn lift_to_tcx(self, tcx: TyCtxt<'tcx>) -> Option<Self::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,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue