diff options
Diffstat (limited to 'compiler/rustc_ast_passes/src/errors.rs')
-rw-r--r-- | compiler/rustc_ast_passes/src/errors.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/compiler/rustc_ast_passes/src/errors.rs b/compiler/rustc_ast_passes/src/errors.rs index d007097d9..27bbd2379 100644 --- a/compiler/rustc_ast_passes/src/errors.rs +++ b/compiler/rustc_ast_passes/src/errors.rs @@ -42,18 +42,20 @@ pub struct InvalidLabel { } #[derive(Diagnostic)] -#[diag(ast_passes_invalid_visibility, code = "E0449")] -pub struct InvalidVisibility { +#[diag(ast_passes_visibility_not_permitted, code = "E0449")] +pub struct VisibilityNotPermitted { #[primary_span] pub span: Span, - #[label(ast_passes_implied)] - pub implied: Option<Span>, #[subdiagnostic] - pub note: Option<InvalidVisibilityNote>, + pub note: VisibilityNotPermittedNote, } #[derive(Subdiagnostic)] -pub enum InvalidVisibilityNote { +pub enum VisibilityNotPermittedNote { + #[note(ast_passes_enum_variant)] + EnumVariant, + #[note(ast_passes_trait_impl)] + TraitImpl, #[note(ast_passes_individual_impl_items)] IndividualImplItems, #[note(ast_passes_individual_foreign_items)] |