@@ -194,24 +194,18 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
194194 if !v. 0 . is_empty ( ) {
195195 span = v. 0 . clone ( ) . into ( ) ;
196196 for sp in v. 0 {
197- span. push_span_label (
198- sp,
199- "`'static` requirement introduced here" . to_string ( ) ,
200- ) ;
197+ span. push_span_label ( sp, "`'static` requirement introduced here" ) ;
201198 }
202199 add_label = false ;
203200 }
204201 }
205202 if add_label {
206203 span. push_span_label (
207204 fn_decl. output . span ( ) ,
208- "requirement introduced by this return type" . to_string ( ) ,
205+ "requirement introduced by this return type" ,
209206 ) ;
210207 }
211- span. push_span_label (
212- cause. span ,
213- "because of this returned expression" . to_string ( ) ,
214- ) ;
208+ span. push_span_label ( cause. span , "because of this returned expression" ) ;
215209 err. span_note (
216210 span,
217211 "`'static` lifetime requirement introduced by the return type" ,
@@ -523,13 +517,11 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
523517 hir_v. visit_ty ( & self_ty) ;
524518 for span in & traits {
525519 let mut multi_span: MultiSpan = vec ! [ * span] . into ( ) ;
526- multi_span. push_span_label (
527- * span,
528- "this has an implicit `'static` lifetime requirement" . to_string ( ) ,
529- ) ;
520+ multi_span
521+ . push_span_label ( * span, "this has an implicit `'static` lifetime requirement" ) ;
530522 multi_span. push_span_label (
531523 ident. span ,
532- "calling this method introduces the `impl`'s 'static` requirement" . to_string ( ) ,
524+ "calling this method introduces the `impl`'s 'static` requirement" ,
533525 ) ;
534526 err. span_note ( multi_span, "the used `impl` has a `'static` requirement" ) ;
535527 err. span_suggestion_verbose (
0 commit comments