X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_middle%2Fsrc%2Fvalues.rs;h=34e8a559784e6f021d3abd53b12271a0d8b74658;hb=cc92bdb9c99b944b77833f3f2cd0e362c94bf861;hp=c242be570312354d780529f5df3449d0e6d64ffe;hpb=fbe82928729c29ea953c95defb81b302dd704fae;p=rust.git diff --git a/compiler/rustc_middle/src/values.rs b/compiler/rustc_middle/src/values.rs index c242be57031..34e8a559784 100644 --- a/compiler/rustc_middle/src/values.rs +++ b/compiler/rustc_middle/src/values.rs @@ -94,6 +94,18 @@ fn from_cycle_error(tcx: TyCtxt<'tcx>, cycle: &[QueryInfo]) -> Self { } } +impl<'tcx> Value, DepKind> for ty::EarlyBinder> { + fn from_cycle_error(tcx: TyCtxt<'tcx>, cycle: &[QueryInfo]) -> Self { + ty::EarlyBinder(Ty::from_cycle_error(tcx, cycle)) + } +} + +impl<'tcx> Value, DepKind> for ty::EarlyBinder>> { + fn from_cycle_error(tcx: TyCtxt<'tcx>, cycle: &[QueryInfo]) -> Self { + ty::EarlyBinder(ty::Binder::from_cycle_error(tcx, cycle)) + } +} + // item_and_field_ids should form a cycle where each field contains the // type in the next element in the list pub fn recursive_type_error(