Use structured suggestions for unconstrained generic parameters on impl blocks
This commit is contained in:
parent
3d68afc9e8
commit
a0db06bdeb
3 changed files with 39 additions and 56 deletions
|
@ -1604,6 +1604,20 @@ pub(crate) enum UnusedGenericParameterHelp {
|
|||
TyAlias { param_name: Ident },
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(hir_analysis_unconstrained_generic_parameter)]
|
||||
pub(crate) struct UnconstrainedGenericParameter {
|
||||
#[primary_span]
|
||||
#[label]
|
||||
pub span: Span,
|
||||
pub param_name: Symbol,
|
||||
pub param_def_kind: &'static str,
|
||||
#[note(hir_analysis_const_param_note)]
|
||||
pub const_param_note: Option<()>,
|
||||
#[note(hir_analysis_const_param_note2)]
|
||||
pub const_param_note2: Option<()>,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
pub enum UnnamedFieldsRepr<'a> {
|
||||
#[diag(hir_analysis_unnamed_fields_repr_missing_repr_c)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue