diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:06:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:06:37 +0000 |
commit | 246f239d9f40f633160f0c18f87a20922d4e77bb (patch) | |
tree | 5a88572663584b3d4d28e5a20e10abab1be40884 /compiler/rustc_privacy/src/errors.rs | |
parent | Releasing progress-linux version 1.64.0+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-246f239d9f40f633160f0c18f87a20922d4e77bb.tar.xz rustc-246f239d9f40f633160f0c18f87a20922d4e77bb.zip |
Merging debian version 1.65.0+dfsg1-2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | compiler/rustc_privacy/src/errors.rs | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/compiler/rustc_privacy/src/errors.rs b/compiler/rustc_privacy/src/errors.rs index aca7d770f..63f83f896 100644 --- a/compiler/rustc_privacy/src/errors.rs +++ b/compiler/rustc_privacy/src/errors.rs @@ -3,7 +3,7 @@ use rustc_macros::{LintDiagnostic, SessionDiagnostic, SessionSubdiagnostic}; use rustc_span::{Span, Symbol}; #[derive(SessionDiagnostic)] -#[error(privacy::field_is_private, code = "E0451")] +#[diag(privacy::field_is_private, code = "E0451")] pub struct FieldIsPrivate { #[primary_span] pub span: Span, @@ -30,7 +30,7 @@ pub enum FieldIsPrivateLabel { } #[derive(SessionDiagnostic)] -#[error(privacy::item_is_private)] +#[diag(privacy::item_is_private)] pub struct ItemIsPrivate<'a> { #[primary_span] #[label] @@ -40,7 +40,7 @@ pub struct ItemIsPrivate<'a> { } #[derive(SessionDiagnostic)] -#[error(privacy::unnamed_item_is_private)] +#[diag(privacy::unnamed_item_is_private)] pub struct UnnamedItemIsPrivate { #[primary_span] pub span: Span, @@ -49,7 +49,7 @@ pub struct UnnamedItemIsPrivate { // Duplicate of `InPublicInterface` but with a different error code, shares the same slug. #[derive(SessionDiagnostic)] -#[error(privacy::in_public_interface, code = "E0445")] +#[diag(privacy::in_public_interface, code = "E0445")] pub struct InPublicInterfaceTraits<'a> { #[primary_span] #[label] @@ -63,7 +63,7 @@ pub struct InPublicInterfaceTraits<'a> { // Duplicate of `InPublicInterfaceTraits` but with a different error code, shares the same slug. #[derive(SessionDiagnostic)] -#[error(privacy::in_public_interface, code = "E0446")] +#[diag(privacy::in_public_interface, code = "E0446")] pub struct InPublicInterface<'a> { #[primary_span] #[label] @@ -75,8 +75,16 @@ pub struct InPublicInterface<'a> { pub vis_span: Span, } +#[derive(SessionDiagnostic)] +#[diag(privacy::report_access_level)] +pub struct ReportAccessLevel { + #[primary_span] + pub span: Span, + pub descr: String, +} + #[derive(LintDiagnostic)] -#[lint(privacy::from_private_dep_in_public_interface)] +#[diag(privacy::from_private_dep_in_public_interface)] pub struct FromPrivateDependencyInPublicInterface<'a> { pub kind: &'a str, pub descr: DiagnosticArgFromDisplay<'a>, @@ -84,7 +92,7 @@ pub struct FromPrivateDependencyInPublicInterface<'a> { } #[derive(LintDiagnostic)] -#[lint(privacy::private_in_public_lint)] +#[diag(privacy::private_in_public_lint)] pub struct PrivateInPublicLint<'a> { pub vis_descr: &'static str, pub kind: &'a str, |