diff options
| author | clubby789 <jamie@hill-daniel.co.uk> | 2024-01-13 19:14:02 +0000 |
|---|---|---|
| committer | clubby789 <jamie@hill-daniel.co.uk> | 2024-01-14 12:31:28 +0000 |
| commit | 511bf6e1c7a3c2bf00d9c6d62f397b90aab55581 (patch) | |
| tree | d099055f138a1eeb33d48a8f45bb7d148ffad521 /compiler/rustc_resolve/src/errors.rs | |
| parent | 1d8d7b16cbcd048e98359cd0d42b03bc1710cca8 (diff) | |
| download | rust-511bf6e1c7a3c2bf00d9c6d62f397b90aab55581.tar.gz rust-511bf6e1c7a3c2bf00d9c6d62f397b90aab55581.zip | |
Add note to resolve error about generics from inside static/const
Diffstat (limited to 'compiler/rustc_resolve/src/errors.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/errors.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/rustc_resolve/src/errors.rs b/compiler/rustc_resolve/src/errors.rs index 1fdb193e571..bd00cab66b0 100644 --- a/compiler/rustc_resolve/src/errors.rs +++ b/compiler/rustc_resolve/src/errors.rs @@ -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)] |
