1
Fork 0

Mention that type parameters are used recursively

This commit is contained in:
Michael Goulet 2024-07-17 15:56:16 -04:00
parent 3de0a7c716
commit 3716a3fd31
9 changed files with 119 additions and 49 deletions

View file

@ -1603,6 +1603,21 @@ pub(crate) struct UnusedGenericParameter {
pub const_param_help: Option<()>,
}
#[derive(Diagnostic)]
#[diag(hir_analysis_recursive_generic_parameter)]
pub(crate) struct RecursiveGenericParameter {
#[primary_span]
pub spans: Vec<Span>,
#[label]
pub param_span: Span,
pub param_name: Ident,
pub param_def_kind: &'static str,
#[subdiagnostic]
pub help: UnusedGenericParameterHelp,
#[note]
pub note: (),
}
#[derive(Subdiagnostic)]
pub(crate) enum UnusedGenericParameterHelp {
#[help(hir_analysis_unused_generic_parameter_adt_help)]