Make can_eq and can_sub return booleans

This commit is contained in:
Michael Goulet 2023-02-13 19:28:10 +00:00
parent 0b439b119b
commit eb286dd070
13 changed files with 33 additions and 43 deletions

View file

@ -1144,7 +1144,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
LateBoundRegionConversionTime::FnCall,
tcx.fn_sig(method_did).subst(tcx, method_substs).input(0),
)
&& infcx.can_eq(self.param_env, ty, self_ty).is_ok()
&& infcx.can_eq(self.param_env, ty, self_ty)
{
err.span_suggestion_verbose(
fn_call_span.shrink_to_lo(),