11use rustc_errors:: { IntoDiagnosticArg , MultiSpan } ;
2- use rustc_macros:: { Diagnostic , LintDiagnostic , SessionSubdiagnostic } ;
2+ use rustc_macros:: { Diagnostic , LintDiagnostic , Subdiagnostic } ;
33use rustc_middle:: ty:: Ty ;
44use rustc_span:: Span ;
55
@@ -23,7 +23,7 @@ pub(crate) struct HigherRankedLifetimeError {
2323 pub span : Span ,
2424}
2525
26- #[ derive( SessionSubdiagnostic ) ]
26+ #[ derive( Subdiagnostic ) ]
2727pub ( crate ) enum HigherRankedErrorCause {
2828 #[ note( borrowck:: could_not_prove) ]
2929 CouldNotProve { predicate : String } ,
@@ -72,7 +72,7 @@ pub(crate) struct FnMutError {
7272 pub ty_err : FnMutReturnTypeErr ,
7373}
7474
75- #[ derive( SessionSubdiagnostic ) ]
75+ #[ derive( Subdiagnostic ) ]
7676pub ( crate ) enum VarHereDenote {
7777 #[ label( borrowck:: var_here_captured) ]
7878 Captured {
@@ -91,7 +91,7 @@ pub(crate) enum VarHereDenote {
9191 } ,
9292}
9393
94- #[ derive( SessionSubdiagnostic ) ]
94+ #[ derive( Subdiagnostic ) ]
9595pub ( crate ) enum FnMutReturnTypeErr {
9696 #[ label( borrowck:: returned_closure_escaped) ]
9797 ReturnClosure {
@@ -117,7 +117,7 @@ pub(crate) struct LifetimeOutliveErr {
117117 pub span : Span ,
118118}
119119
120- #[ derive( SessionSubdiagnostic ) ]
120+ #[ derive( Subdiagnostic ) ]
121121pub ( crate ) enum LifetimeReturnCategoryErr < ' a > {
122122 #[ label( borrowck:: returned_lifetime_wrong) ]
123123 WrongReturn {
@@ -149,7 +149,7 @@ impl IntoDiagnosticArg for RegionName {
149149 }
150150}
151151
152- #[ derive( SessionSubdiagnostic ) ]
152+ #[ derive( Subdiagnostic ) ]
153153pub ( crate ) enum RequireStaticErr {
154154 #[ note( borrowck:: used_impl_require_static) ]
155155 UsedImpl {
0 commit comments