1
Fork 0

Cleanup: HIR ty lowering: Consolidate assoc item access checking

This commit is contained in:
León Orell Valerian Liehr 2024-06-04 16:47:23 +02:00
parent 9f2d0b3490
commit c59a2b2746
No known key found for this signature in database
GPG key ID: D17A07215F68E713
6 changed files with 97 additions and 69 deletions

View file

@ -55,6 +55,18 @@ pub struct AssocKindMismatchWrapInBracesSugg {
pub hi: Span,
}
#[derive(Diagnostic)]
#[diag(hir_analysis_assoc_item_is_private, code = E0624)]
pub struct AssocItemIsPrivate {
#[primary_span]
#[label]
pub span: Span,
pub kind: &'static str,
pub name: Ident,
#[label(hir_analysis_defined_here_label)]
pub defined_here_label: Span,
}
#[derive(Diagnostic)]
#[diag(hir_analysis_assoc_item_not_found, code = E0220)]
pub struct AssocItemNotFound<'a> {