Make can_eq and can_sub return booleans
This commit is contained in:
@@ -576,7 +576,7 @@ fn foo(&self) -> Self::T { String::new() }
|
||||
tcx.impl_defaultness(item.id.owner_id)
|
||||
{
|
||||
let assoc_ty = tcx.bound_type_of(item.id.owner_id).subst_identity();
|
||||
if self.infcx.can_eq(param_env, assoc_ty, found).is_ok() {
|
||||
if self.infcx.can_eq(param_env, assoc_ty, found) {
|
||||
diag.span_label(
|
||||
item.span,
|
||||
"associated type defaults can't be assumed inside the \
|
||||
@@ -598,7 +598,7 @@ fn foo(&self) -> Self::T { String::new() }
|
||||
if let hir::AssocItemKind::Type = item.kind {
|
||||
let assoc_ty = tcx.bound_type_of(item.id.owner_id).subst_identity();
|
||||
|
||||
if self.infcx.can_eq(param_env, assoc_ty, found).is_ok() {
|
||||
if self.infcx.can_eq(param_env, assoc_ty, found) {
|
||||
diag.span_label(item.span, "expected this associated type");
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user