@@ -28,15 +28,6 @@ pub struct UnableToConstructConstantValue<'a> {
2828 pub unevaluated : ty:: UnevaluatedConst < ' a > ,
2929}
3030
31- #[ derive( Diagnostic ) ]
32- #[ diag( "this attribute must have a value" , code = E0232 ) ]
33- #[ note( "e.g. `#[rustc_on_unimplemented(message=\" foo\" )]`" ) ]
34- pub struct NoValueInOnUnimplemented {
35- #[ primary_span]
36- #[ label( "expected value here" ) ]
37- pub span : Span ,
38- }
39-
4031pub struct NegativePositiveConflict < ' tcx > {
4132 pub impl_span : Span ,
4233 pub trait_desc : ty:: TraitRef < ' tcx > ,
@@ -1201,60 +1192,6 @@ pub struct TraitImplDiff {
12011192 pub found : String ,
12021193}
12031194
1204- pub struct DynTraitConstraintSuggestion {
1205- pub span : Span ,
1206- pub ident : Ident ,
1207- }
1208-
1209- impl Subdiagnostic for DynTraitConstraintSuggestion {
1210- fn add_to_diag < G : EmissionGuarantee > ( self , diag : & mut Diag < ' _ , G > ) {
1211- let mut multi_span: MultiSpan = vec ! [ self . span] . into ( ) ;
1212- multi_span. push_span_label (
1213- self . span ,
1214- msg ! ( "this has an implicit `'static` lifetime requirement" ) ,
1215- ) ;
1216- multi_span. push_span_label (
1217- self . ident . span ,
1218- msg ! ( "calling this method introduces the `impl`'s `'static` requirement" ) ,
1219- ) ;
1220- let msg = msg ! ( "the used `impl` has a `'static` requirement" ) ;
1221- diag. span_note ( multi_span, msg) ;
1222- let msg = msg ! ( "consider relaxing the implicit `'static` requirement" ) ;
1223- diag. span_suggestion_verbose (
1224- self . span . shrink_to_hi ( ) ,
1225- msg,
1226- " + '_" ,
1227- Applicability :: MaybeIncorrect ,
1228- ) ;
1229- }
1230- }
1231-
1232- pub struct ReqIntroducedLocations {
1233- pub span : MultiSpan ,
1234- pub spans : Vec < Span > ,
1235- pub fn_decl_span : Span ,
1236- pub cause_span : Span ,
1237- pub add_label : bool ,
1238- }
1239-
1240- impl Subdiagnostic for ReqIntroducedLocations {
1241- fn add_to_diag < G : EmissionGuarantee > ( mut self , diag : & mut Diag < ' _ , G > ) {
1242- for sp in self . spans {
1243- self . span . push_span_label ( sp, msg ! ( "`'static` requirement introduced here" ) ) ;
1244- }
1245-
1246- if self . add_label {
1247- self . span . push_span_label (
1248- self . fn_decl_span ,
1249- msg ! ( "requirement introduced by this return type" ) ,
1250- ) ;
1251- }
1252- self . span . push_span_label ( self . cause_span , msg ! ( "because of this returned expression" ) ) ;
1253- let msg = msg ! ( "\" `'static` lifetime requirement introduced by the return type" ) ;
1254- diag. span_note ( self . span , msg) ;
1255- }
1256- }
1257-
12581195#[ derive( Diagnostic ) ]
12591196#[ diag( "{$has_param_name ->
12601197 [true] `{$param_name}`
0 commit comments