about summary refs log tree commit diff
path: root/compiler/rustc_borrowck
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-02-15 21:30:56 +0100
committerGitHub <noreply@github.com>2023-02-15 21:30:56 +0100
commit8f65e25aec6d42e049346aae52f8fec2fa508c38 (patch)
tree008842d751188bfae1dbf787236e09bc786f828d /compiler/rustc_borrowck
parentd40c13ae02900e7bdef494d0212eb99335b7616c (diff)
parenteb286dd07082b35be7532984054204a3d9fd5617 (diff)
downloadrust-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.rs2
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(),