@@ -605,7 +605,7 @@ impl Diagnostic {
605
605
& mut self ,
606
606
sp : Span ,
607
607
msg : impl Into < DiagnosticMessage > ,
608
- suggestion : String ,
608
+ suggestion : impl ToString ,
609
609
applicability : Applicability ,
610
610
) -> & mut Self {
611
611
self . span_suggestion_with_style (
@@ -623,13 +623,13 @@ impl Diagnostic {
623
623
& mut self ,
624
624
sp : Span ,
625
625
msg : impl Into < DiagnosticMessage > ,
626
- suggestion : String ,
626
+ suggestion : impl ToString ,
627
627
applicability : Applicability ,
628
628
style : SuggestionStyle ,
629
629
) -> & mut Self {
630
630
self . push_suggestion ( CodeSuggestion {
631
631
substitutions : vec ! [ Substitution {
632
- parts: vec![ SubstitutionPart { snippet: suggestion, span: sp } ] ,
632
+ parts: vec![ SubstitutionPart { snippet: suggestion. to_string ( ) , span: sp } ] ,
633
633
} ] ,
634
634
msg : msg. into ( ) ,
635
635
style,
@@ -643,7 +643,7 @@ impl Diagnostic {
643
643
& mut self ,
644
644
sp : Span ,
645
645
msg : impl Into < DiagnosticMessage > ,
646
- suggestion : String ,
646
+ suggestion : impl ToString ,
647
647
applicability : Applicability ,
648
648
) -> & mut Self {
649
649
self . span_suggestion_with_style (
@@ -711,7 +711,7 @@ impl Diagnostic {
711
711
& mut self ,
712
712
sp : Span ,
713
713
msg : impl Into < DiagnosticMessage > ,
714
- suggestion : String ,
714
+ suggestion : impl ToString ,
715
715
applicability : Applicability ,
716
716
) -> & mut Self {
717
717
self . span_suggestion_with_style (
@@ -734,7 +734,7 @@ impl Diagnostic {
734
734
& mut self ,
735
735
sp : Span ,
736
736
msg : impl Into < DiagnosticMessage > ,
737
- suggestion : String ,
737
+ suggestion : impl ToString ,
738
738
applicability : Applicability ,
739
739
) -> & mut Self {
740
740
self . span_suggestion_with_style (
@@ -755,7 +755,7 @@ impl Diagnostic {
755
755
& mut self ,
756
756
sp : Span ,
757
757
msg : impl Into < DiagnosticMessage > ,
758
- suggestion : String ,
758
+ suggestion : impl ToString ,
759
759
applicability : Applicability ,
760
760
) -> & mut Self {
761
761
self . span_suggestion_with_style (
0 commit comments