diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:06:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:06:31 +0000 |
commit | 2ff14448863ac1a1dd9533461708e29aae170c2d (patch) | |
tree | 85b9fea2bbfe3f06473cfa381eed11f273b57c5c /compiler/rustc_privacy/src/errors.rs | |
parent | Adding debian version 1.64.0+dfsg1-1. (diff) | |
download | rustc-2ff14448863ac1a1dd9533461708e29aae170c2d.tar.xz rustc-2ff14448863ac1a1dd9533461708e29aae170c2d.zip |
Adding debian version 1.65.0+dfsg1-2.debian/1.65.0+dfsg1-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'compiler/rustc_privacy/src/errors.rs')
-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, |