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 @@ -686,19 +686,12 @@ impl Diagnostic {
686686 suggestion : Vec < ( Span , String ) > ,
687687 applicability : Applicability ,
688688 ) -> & mut Self {
689- assert ! ( !suggestion. is_empty( ) ) ;
690- self . push_suggestion ( CodeSuggestion {
691- substitutions : vec ! [ Substitution {
692- parts: suggestion
693- . into_iter( )
694- . map( |( span, snippet) | SubstitutionPart { snippet, span } )
695- . collect( ) ,
696- } ] ,
697- msg : self . subdiagnostic_message_to_diagnostic_message ( msg) ,
698- style : SuggestionStyle :: CompletelyHidden ,
689+ self . multipart_suggestion_with_style (
690+ msg,
691+ suggestion,
699692 applicability,
700- } ) ;
701- self
693+ SuggestionStyle :: CompletelyHidden ,
694+ )
702695 }
703696
704697 /// Prints out a message with a suggested edit of the code.
You can’t perform that action at this time.
0 commit comments