1
Fork 0

Fix error message with non-tupled bare fn trait

This commit is contained in:
Michael Goulet 2022-07-30 09:41:19 +00:00
parent 40336865fe
commit 8b64988575
10 changed files with 101 additions and 38 deletions

View file

@ -1935,6 +1935,18 @@ impl<'tcx> TypeTrace<'tcx> {
}
}
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,