@@ -15,7 +15,6 @@ use rustc_macros::{LintDiagnostic, Subdiagnostic};
1515use rustc_middle:: ty:: inhabitedness:: InhabitedPredicate ;
1616use rustc_middle:: ty:: { Clause , PolyExistentialTraitRef , Ty , TyCtxt } ;
1717use rustc_session:: Session ;
18- use rustc_session:: lint:: AmbiguityErrorDiag ;
1918use rustc_span:: edition:: Edition ;
2019use rustc_span:: { Ident , Span , Symbol , sym} ;
2120
@@ -2575,43 +2574,6 @@ pub(crate) mod unexpected_cfg_value {
25752574 }
25762575}
25772576
2578- #[ derive( LintDiagnostic ) ]
2579- #[ diag( lint_private_extern_crate_reexport, code = E0365 ) ]
2580- pub ( crate ) struct PrivateExternCrateReexport {
2581- pub ident : Ident ,
2582- #[ suggestion( code = "pub " , style = "verbose" , applicability = "maybe-incorrect" ) ]
2583- pub sugg : Span ,
2584- }
2585-
2586- #[ derive( LintDiagnostic ) ]
2587- #[ diag( lint_macro_is_private) ]
2588- pub ( crate ) struct MacroIsPrivate {
2589- pub ident : Ident ,
2590- }
2591-
2592- #[ derive( LintDiagnostic ) ]
2593- #[ diag( lint_unused_macro_definition) ]
2594- pub ( crate ) struct UnusedMacroDefinition {
2595- pub name : Symbol ,
2596- }
2597-
2598- #[ derive( LintDiagnostic ) ]
2599- #[ diag( lint_macro_rule_never_used) ]
2600- pub ( crate ) struct MacroRuleNeverUsed {
2601- pub n : usize ,
2602- pub name : Symbol ,
2603- }
2604-
2605- pub ( crate ) struct UnstableFeature {
2606- pub msg : DiagMessage ,
2607- }
2608-
2609- impl < ' a > LintDiagnostic < ' a , ( ) > for UnstableFeature {
2610- fn decorate_lint < ' b > ( self , diag : & ' b mut Diag < ' a , ( ) > ) {
2611- diag. primary_message ( self . msg ) ;
2612- }
2613- }
2614-
26152577#[ derive( LintDiagnostic ) ]
26162578#[ diag( lint_unused_crate_dependency) ]
26172579#[ help]
@@ -2631,26 +2593,6 @@ pub(crate) struct IllFormedAttributeInput {
26312593 pub docs : & ' static str ,
26322594}
26332595
2634- #[ derive( LintDiagnostic ) ]
2635- #[ diag( lint_unknown_diagnostic_attribute) ]
2636- pub ( crate ) struct UnknownDiagnosticAttribute {
2637- #[ subdiagnostic]
2638- pub typo : Option < UnknownDiagnosticAttributeTypoSugg > ,
2639- }
2640-
2641- #[ derive( Subdiagnostic ) ]
2642- #[ suggestion(
2643- lint_unknown_diagnostic_attribute_typo_sugg,
2644- style = "verbose" ,
2645- code = "{typo_name}" ,
2646- applicability = "machine-applicable"
2647- ) ]
2648- pub ( crate ) struct UnknownDiagnosticAttributeTypoSugg {
2649- #[ primary_span]
2650- pub span : Span ,
2651- pub typo_name : Symbol ,
2652- }
2653-
26542596#[ derive( LintDiagnostic ) ]
26552597#[ diag( lint_unicode_text_flow) ]
26562598#[ note]
@@ -2893,27 +2835,6 @@ pub(crate) struct NamedArgumentUsedPositionally {
28932835 pub named_arg_name : String ,
28942836}
28952837
2896- #[ derive( LintDiagnostic ) ]
2897- #[ diag( lint_extern_crate_not_idiomatic) ]
2898- pub ( crate ) struct ExternCrateNotIdiomatic {
2899- #[ suggestion( style = "verbose" , code = "{code}" , applicability = "machine-applicable" ) ]
2900- pub span : Span ,
2901-
2902- pub code : & ' static str ,
2903- }
2904-
2905- // FIXME: make this translatable
2906- pub ( crate ) struct AmbiguousGlobImports {
2907- pub ambiguity : AmbiguityErrorDiag ,
2908- }
2909-
2910- impl < ' a , G : EmissionGuarantee > LintDiagnostic < ' a , G > for AmbiguousGlobImports {
2911- fn decorate_lint < ' b > ( self , diag : & ' b mut Diag < ' a , G > ) {
2912- diag. primary_message ( self . ambiguity . msg . clone ( ) ) ;
2913- rustc_errors:: report_ambiguity_error ( diag, self . ambiguity ) ;
2914- }
2915- }
2916-
29172838#[ derive( LintDiagnostic ) ]
29182839#[ diag( lint_ambiguous_glob_reexport) ]
29192840pub ( crate ) struct AmbiguousGlobReexports {
@@ -2959,18 +2880,6 @@ pub(crate) struct AssociatedConstElidedLifetime {
29592880 pub lifetimes_in_scope : MultiSpan ,
29602881}
29612882
2962- #[ derive( LintDiagnostic ) ]
2963- #[ diag( lint_redundant_import_visibility) ]
2964- pub ( crate ) struct RedundantImportVisibility {
2965- #[ note]
2966- pub span : Span ,
2967- #[ help]
2968- pub help : ( ) ,
2969-
2970- pub import_vis : String ,
2971- pub max_vis : String ,
2972- }
2973-
29742883#[ derive( LintDiagnostic ) ]
29752884#[ diag( lint_unsafe_attr_outside_unsafe) ]
29762885pub ( crate ) struct UnsafeAttrOutsideUnsafe {
@@ -2992,16 +2901,6 @@ pub(crate) struct UnsafeAttrOutsideUnsafeSuggestion {
29922901 pub right : Span ,
29932902}
29942903
2995- #[ derive( LintDiagnostic ) ]
2996- #[ diag( lint_out_of_scope_macro_calls) ]
2997- #[ help]
2998- pub ( crate ) struct OutOfScopeMacroCalls {
2999- #[ label]
3000- pub span : Span ,
3001- pub path : String ,
3002- pub location : String ,
3003- }
3004-
30052904#[ derive( LintDiagnostic ) ]
30062905#[ diag( lint_static_mut_refs_lint) ]
30072906pub ( crate ) struct RefOfMutStatic < ' a > {
0 commit comments