Add warn(unreachable_pub)
to rustc_macros
.
This commit is contained in:
parent
6cf068db56
commit
4b92682530
8 changed files with 17 additions and 16 deletions
|
@ -55,7 +55,7 @@ use synstructure::Structure;
|
|||
///
|
||||
/// See rustc dev guide for more examples on using the `#[derive(Diagnostic)]`:
|
||||
/// <https://rustc-dev-guide.rust-lang.org/diagnostics/diagnostic-structs.html>
|
||||
pub fn diagnostic_derive(mut s: Structure<'_>) -> TokenStream {
|
||||
pub(super) fn diagnostic_derive(mut s: Structure<'_>) -> TokenStream {
|
||||
s.underscore_const(true);
|
||||
DiagnosticDerive::new(s).into_tokens()
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ pub fn diagnostic_derive(mut s: Structure<'_>) -> TokenStream {
|
|||
///
|
||||
/// See rustc dev guide for more examples on using the `#[derive(LintDiagnostic)]`:
|
||||
/// <https://rustc-dev-guide.rust-lang.org/diagnostics/diagnostic-structs.html#reference>
|
||||
pub fn lint_diagnostic_derive(mut s: Structure<'_>) -> TokenStream {
|
||||
pub(super) fn lint_diagnostic_derive(mut s: Structure<'_>) -> TokenStream {
|
||||
s.underscore_const(true);
|
||||
LintDiagnosticDerive::new(s).into_tokens()
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ pub fn lint_diagnostic_derive(mut s: Structure<'_>) -> TokenStream {
|
|||
///
|
||||
/// diag.subdiagnostic(RawIdentifierSuggestion { span, applicability, ident });
|
||||
/// ```
|
||||
pub fn subdiagnostic_derive(mut s: Structure<'_>) -> TokenStream {
|
||||
pub(super) fn subdiagnostic_derive(mut s: Structure<'_>) -> TokenStream {
|
||||
s.underscore_const(true);
|
||||
SubdiagnosticDerive::new().into_tokens(s)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue