Add note to resolve error about generics from inside static/const
This commit is contained in:
parent
1d8d7b16cb
commit
511bf6e1c7
11 changed files with 98 additions and 32 deletions
|
@ -44,6 +44,16 @@ pub(crate) struct GenericParamsFromOuterItem {
|
|||
pub(crate) refer_to_type_directly: Option<Span>,
|
||||
#[subdiagnostic]
|
||||
pub(crate) sugg: Option<GenericParamsFromOuterItemSugg>,
|
||||
#[subdiagnostic]
|
||||
pub(crate) static_or_const: Option<GenericParamsFromOuterItemStaticOrConst>,
|
||||
}
|
||||
|
||||
#[derive(Subdiagnostic)]
|
||||
pub(crate) enum GenericParamsFromOuterItemStaticOrConst {
|
||||
#[note(resolve_generic_params_from_outer_item_static)]
|
||||
Static,
|
||||
#[note(resolve_generic_params_from_outer_item_const)]
|
||||
Const,
|
||||
}
|
||||
|
||||
#[derive(Subdiagnostic)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue