1
Fork 0

Rollup merge of #108010 - compiler-errors:can_eq-returns-bool, r=lcnr

Make `InferCtxt::can_eq` and `InferCtxt::can_sub` return booleans

Nobody matches on the result, nor does the result return anything useful...
This commit is contained in:
Matthias Krüger 2023-02-15 21:30:56 +01:00 committed by GitHub
commit 8f65e25aec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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(),