1
Fork 0

Store associated item defaultness in impl_defaultness.

This commit is contained in:
Camille GILLOT 2022-03-12 19:36:11 +01:00
parent c9e134e1b6
commit 110f0656cb
25 changed files with 89 additions and 107 deletions

View file

@ -844,7 +844,8 @@ fn foo(&self) -> Self::T { String::new() }
hir::AssocItemKind::Type => {
// FIXME: account for returning some type in a trait fn impl that has
// an assoc type as a return type (#72076).
if let hir::Defaultness::Default { has_value: true } = item.defaultness
if let hir::Defaultness::Default { has_value: true } =
self.impl_defaultness(item.id.def_id)
{
if self.type_of(item.id.def_id) == found {
diag.span_label(