File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed
compiler/rustc_errors/src Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -672,19 +672,12 @@ impl Diagnostic {
672
672
suggestion : Vec < ( Span , String ) > ,
673
673
applicability : Applicability ,
674
674
) -> & mut Self {
675
- assert ! ( !suggestion. is_empty( ) ) ;
676
- self . push_suggestion ( CodeSuggestion {
677
- substitutions : vec ! [ Substitution {
678
- parts: suggestion
679
- . into_iter( )
680
- . map( |( span, snippet) | SubstitutionPart { snippet, span } )
681
- . collect( ) ,
682
- } ] ,
683
- msg : self . subdiagnostic_message_to_diagnostic_message ( msg) ,
684
- style : SuggestionStyle :: CompletelyHidden ,
675
+ self . multipart_suggestion_with_style (
676
+ msg,
677
+ suggestion,
685
678
applicability,
686
- } ) ;
687
- self
679
+ SuggestionStyle :: CompletelyHidden ,
680
+ )
688
681
}
689
682
690
683
/// Prints out a message with a suggested edit of the code.
You can’t perform that action at this time.
0 commit comments