@@ -605,7 +605,7 @@ impl Diagnostic {
605605 & mut self ,
606606 sp : Span ,
607607 msg : impl Into < DiagnosticMessage > ,
608- suggestion : String ,
608+ suggestion : impl ToString ,
609609 applicability : Applicability ,
610610 ) -> & mut Self {
611611 self . span_suggestion_with_style (
@@ -623,13 +623,13 @@ impl Diagnostic {
623623 & mut self ,
624624 sp : Span ,
625625 msg : impl Into < DiagnosticMessage > ,
626- suggestion : String ,
626+ suggestion : impl ToString ,
627627 applicability : Applicability ,
628628 style : SuggestionStyle ,
629629 ) -> & mut Self {
630630 self . push_suggestion ( CodeSuggestion {
631631 substitutions : vec ! [ Substitution {
632- parts: vec![ SubstitutionPart { snippet: suggestion, span: sp } ] ,
632+ parts: vec![ SubstitutionPart { snippet: suggestion. to_string ( ) , span: sp } ] ,
633633 } ] ,
634634 msg : msg. into ( ) ,
635635 style,
@@ -643,7 +643,7 @@ impl Diagnostic {
643643 & mut self ,
644644 sp : Span ,
645645 msg : impl Into < DiagnosticMessage > ,
646- suggestion : String ,
646+ suggestion : impl ToString ,
647647 applicability : Applicability ,
648648 ) -> & mut Self {
649649 self . span_suggestion_with_style (
@@ -711,7 +711,7 @@ impl Diagnostic {
711711 & mut self ,
712712 sp : Span ,
713713 msg : impl Into < DiagnosticMessage > ,
714- suggestion : String ,
714+ suggestion : impl ToString ,
715715 applicability : Applicability ,
716716 ) -> & mut Self {
717717 self . span_suggestion_with_style (
@@ -734,7 +734,7 @@ impl Diagnostic {
734734 & mut self ,
735735 sp : Span ,
736736 msg : impl Into < DiagnosticMessage > ,
737- suggestion : String ,
737+ suggestion : impl ToString ,
738738 applicability : Applicability ,
739739 ) -> & mut Self {
740740 self . span_suggestion_with_style (
@@ -755,7 +755,7 @@ impl Diagnostic {
755755 & mut self ,
756756 sp : Span ,
757757 msg : impl Into < DiagnosticMessage > ,
758- suggestion : String ,
758+ suggestion : impl ToString ,
759759 applicability : Applicability ,
760760 ) -> & mut Self {
761761 self . span_suggestion_with_style (
0 commit comments