Fix error message with non-tupled bare fn trait
This commit is contained in:
parent
40336865fe
commit
8b64988575
10 changed files with 101 additions and 38 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue