@@ -488,7 +488,7 @@ impl<'a> AstValidator<'a> {
488
488
. span_suggestion (
489
489
replace_span,
490
490
& format ! ( "provide a definition for the {}" , ctx) ,
491
- sugg. to_string ( ) ,
491
+ sugg,
492
492
Applicability :: HasPlaceholders ,
493
493
)
494
494
. emit ( ) ;
@@ -522,7 +522,7 @@ impl<'a> AstValidator<'a> {
522
522
. span_suggestion (
523
523
span,
524
524
& format ! ( "remove the {}" , remove_descr) ,
525
- String :: new ( ) ,
525
+ "" ,
526
526
Applicability :: MaybeIncorrect ,
527
527
)
528
528
. span_label ( self . current_extern_span ( ) , "`extern` block begins here" )
@@ -570,7 +570,7 @@ impl<'a> AstValidator<'a> {
570
570
. span_suggestion (
571
571
body. span ,
572
572
"remove the invalid body" ,
573
- ";" . to_string ( ) ,
573
+ ";" ,
574
574
Applicability :: MaybeIncorrect ,
575
575
)
576
576
. help (
@@ -599,7 +599,7 @@ impl<'a> AstValidator<'a> {
599
599
. span_suggestion_verbose (
600
600
span. until ( ident. span . shrink_to_lo ( ) ) ,
601
601
"remove the qualifiers" ,
602
- "fn " . to_string ( ) ,
602
+ "fn " ,
603
603
Applicability :: MaybeIncorrect ,
604
604
)
605
605
. emit ( ) ;
@@ -703,7 +703,7 @@ impl<'a> AstValidator<'a> {
703
703
. span_suggestion (
704
704
generics. span ,
705
705
"remove the parameters" ,
706
- String :: new ( ) ,
706
+ "" ,
707
707
Applicability :: MachineApplicable ,
708
708
)
709
709
. emit ( ) ;
@@ -721,7 +721,7 @@ impl<'a> AstValidator<'a> {
721
721
. span_suggestion (
722
722
span,
723
723
"remove the super traits or lifetime bounds" ,
724
- String :: new ( ) ,
724
+ "" ,
725
725
Applicability :: MachineApplicable ,
726
726
)
727
727
. emit ( ) ;
@@ -753,7 +753,7 @@ impl<'a> AstValidator<'a> {
753
753
. span_suggestion (
754
754
total_span,
755
755
"remove these associated items" ,
756
- String :: new ( ) ,
756
+ "" ,
757
757
Applicability :: MachineApplicable ,
758
758
)
759
759
. span_label ( ident_span, "auto trait cannot have associated items" )
@@ -993,7 +993,7 @@ fn validate_generic_param_order(
993
993
err. span_suggestion (
994
994
span,
995
995
"reorder the parameters: lifetimes, then consts and types" ,
996
- ordered_params. clone ( ) ,
996
+ & ordered_params,
997
997
Applicability :: MachineApplicable ,
998
998
) ;
999
999
err. emit ( ) ;
0 commit comments