Rollup merge of #119939 - clubby789:static-const-generic-note, r=compiler-errors
Improve 'generic param from outer item' error for `Self` and inside `static`/`const` items Fixes #109596 Fixes #119936
This commit is contained in:
commit
3c52832375
16 changed files with 118 additions and 43 deletions
|
@ -45,6 +45,17 @@ 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>,
|
||||
pub(crate) is_self: bool,
|
||||
}
|
||||
|
||||
#[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