Fix associated type errors too
This commit is contained in:
parent
e4dfca8ac2
commit
06072468fe
5 changed files with 52 additions and 0 deletions
|
@ -620,6 +620,8 @@ hir_analysis_variances_of = {$variances}
|
|||
hir_analysis_where_clause_on_main = `main` function is not allowed to have a `where` clause
|
||||
.label = `main` cannot have a `where` clause
|
||||
|
||||
hir_analysis_within_macro = due to this macro variable
|
||||
|
||||
hir_analysis_wrong_number_of_generic_arguments_to_intrinsic =
|
||||
intrinsic has wrong number of {$descr} parameters: found {$found}, expected {$expected}
|
||||
.label = expected {$expected} {$descr} {$expected ->
|
||||
|
|
|
@ -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)]
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue