1
Fork 0

Fix associated type errors too

This commit is contained in:
Michael Goulet 2025-02-24 20:36:15 +00:00
parent e4dfca8ac2
commit 06072468fe
5 changed files with 52 additions and 0 deletions

View file

@ -84,6 +84,8 @@ pub(crate) struct AssocItemNotFound<'a> {
pub label: Option<AssocItemNotFoundLabel<'a>>,
#[subdiagnostic]
pub sugg: Option<AssocItemNotFoundSugg<'a>>,
#[label(hir_analysis_within_macro)]
pub within_macro_span: Option<Span>,
}
#[derive(Subdiagnostic)]

View file

@ -151,6 +151,9 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
qself: &qself_str,
label: None,
sugg: None,
// Try to get the span of the identifier within the path's syntax context
// (if that's different).
within_macro_span: assoc_name.span.within_macro(span),
};
if is_dummy {