X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_infer%2Fsrc%2Finfer%2Fmod.rs;h=444817f396e567b87744da72c5d221665370ad4b;hb=33b5ce6433c58d4101118d58c3ae6aae0b9b1a5f;hp=1e26e7bb86ef03a1b086e7e9821d9f52cbd4fd28;hpb=17914c89ecbe9e7d7c887d1596d7f0463ee9a1aa;p=rust.git diff --git a/compiler/rustc_infer/src/infer/mod.rs b/compiler/rustc_infer/src/infer/mod.rs index 1e26e7bb86e..444817f396e 100644 --- a/compiler/rustc_infer/src/infer/mod.rs +++ b/compiler/rustc_infer/src/infer/mod.rs @@ -1935,6 +1935,18 @@ pub fn types( } } + pub fn poly_trait_refs( + cause: &ObligationCause<'tcx>, + a_is_expected: bool, + a: ty::PolyTraitRef<'tcx>, + b: ty::PolyTraitRef<'tcx>, + ) -> TypeTrace<'tcx> { + TypeTrace { + cause: cause.clone(), + values: PolyTraitRefs(ExpectedFound::new(a_is_expected, a.into(), b.into())), + } + } + pub fn consts( cause: &ObligationCause<'tcx>, a_is_expected: bool,