Point to argument/return type instead of the whole function header
This commit is contained in:
parent
bae645451e
commit
12243ec415
11 changed files with 100 additions and 25 deletions
|
@ -260,7 +260,8 @@ impl<T> Trait<T> for X {
|
|||
(ty::Alias(ty::Opaque, alias), _) | (_, ty::Alias(ty::Opaque, alias)) if alias.def_id.is_local() && matches!(tcx.def_kind(body_owner_def_id), DefKind::AssocFn | DefKind::AssocConst) => {
|
||||
if tcx.is_type_alias_impl_trait(alias.def_id) {
|
||||
if !tcx.opaque_types_defined_by(body_owner_def_id.expect_local()).contains(&alias.def_id.expect_local()) {
|
||||
diag.span_note(tcx.def_span(body_owner_def_id), "\
|
||||
let sp = tcx.def_ident_span(body_owner_def_id).unwrap_or_else(|| tcx.def_span(body_owner_def_id));
|
||||
diag.span_note(sp, "\
|
||||
this item must have the opaque type in its signature \
|
||||
in order to be able to register hidden types");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue