Replace old private-in-public diagnostic with type privacy lints
This commit is contained in:
parent
5cbfee5455
commit
e26614e6a7
68 changed files with 862 additions and 1700 deletions
|
@ -47,21 +47,6 @@ pub struct UnnamedItemIsPrivate {
|
|||
pub kind: &'static str,
|
||||
}
|
||||
|
||||
// Duplicate of `InPublicInterface` but with a different error code, shares the same slug.
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(privacy_in_public_interface, code = "E0445")]
|
||||
pub struct InPublicInterfaceTraits<'a> {
|
||||
#[primary_span]
|
||||
#[label]
|
||||
pub span: Span,
|
||||
pub vis_descr: &'static str,
|
||||
pub kind: &'a str,
|
||||
pub descr: DiagnosticArgFromDisplay<'a>,
|
||||
#[label(privacy_visibility_label)]
|
||||
pub vis_span: Span,
|
||||
}
|
||||
|
||||
// Duplicate of `InPublicInterfaceTraits` but with a different error code, shares the same slug.
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(privacy_in_public_interface, code = "E0446")]
|
||||
pub struct InPublicInterface<'a> {
|
||||
|
@ -91,14 +76,6 @@ pub struct FromPrivateDependencyInPublicInterface<'a> {
|
|||
pub krate: Symbol,
|
||||
}
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(privacy_private_in_public_lint)]
|
||||
pub struct PrivateInPublicLint<'a> {
|
||||
pub vis_descr: &'static str,
|
||||
pub kind: &'a str,
|
||||
pub descr: DiagnosticArgFromDisplay<'a>,
|
||||
}
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(privacy_unnameable_types_lint)]
|
||||
pub struct UnnameableTypesLint<'a> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue