Define const_unification_error
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
This commit is contained in:
parent
05ac3ac575
commit
b9b9994c72
@ -597,6 +597,15 @@ fn compare<F>(&self, t: T, f: F) -> RelateResult<'tcx, T> where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn const_unification_error<'tcx>(
|
||||||
|
a_is_expected: bool,
|
||||||
|
(a, b): (&'tcx LazyConst<'tcx>, &'tcx LazyConst<'tcx>),
|
||||||
|
) -> TypeError<'tcx> {
|
||||||
|
TypeError::ConstError(
|
||||||
|
ConstError::Mismatch(ty::relate::expected_found_bool(a_is_expected, &a, &b))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
fn int_unification_error<'tcx>(a_is_expected: bool, v: (ty::IntVarValue, ty::IntVarValue))
|
fn int_unification_error<'tcx>(a_is_expected: bool, v: (ty::IntVarValue, ty::IntVarValue))
|
||||||
-> TypeError<'tcx>
|
-> TypeError<'tcx>
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user