diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-02-15 21:30:56 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-15 21:30:56 +0100 |
| commit | 8f65e25aec6d42e049346aae52f8fec2fa508c38 (patch) | |
| tree | 008842d751188bfae1dbf787236e09bc786f828d /compiler/rustc_borrowck | |
| parent | d40c13ae02900e7bdef494d0212eb99335b7616c (diff) | |
| parent | eb286dd07082b35be7532984054204a3d9fd5617 (diff) | |
| download | rust-8f65e25aec6d42e049346aae52f8fec2fa508c38.tar.gz rust-8f65e25aec6d42e049346aae52f8fec2fa508c38.zip | |
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...
Diffstat (limited to 'compiler/rustc_borrowck')
| -rw-r--r-- | compiler/rustc_borrowck/src/diagnostics/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_borrowck/src/diagnostics/mod.rs b/compiler/rustc_borrowck/src/diagnostics/mod.rs index a89643fcfd4..c4e4e0517ec 100644 --- a/compiler/rustc_borrowck/src/diagnostics/mod.rs +++ b/compiler/rustc_borrowck/src/diagnostics/mod.rs @@ -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(), |
