File tree 1 file changed +7
-7
lines changed
compiler/rustc_errors/src
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -777,15 +777,15 @@ impl Diagnostic {
777
777
applicability : Applicability ,
778
778
style : SuggestionStyle ,
779
779
) -> & mut Self {
780
- let suggestions: Vec < _ > = suggestions. into_iter ( ) . collect ( ) ;
781
- debug_assert ! (
782
- !( sp. is_empty( ) && suggestions. iter( ) . any( |suggestion| suggestion. is_empty( ) ) ) ,
783
- "Span must not be empty and have no suggestion"
784
- ) ;
785
-
786
780
let substitutions = suggestions
787
781
. into_iter ( )
788
- . map ( |snippet| Substitution { parts : vec ! [ SubstitutionPart { snippet, span: sp } ] } )
782
+ . map ( |snippet| {
783
+ debug_assert ! (
784
+ !( sp. is_empty( ) && snippet. is_empty( ) ) ,
785
+ "Span must not be empty and have no suggestion"
786
+ ) ;
787
+ Substitution { parts : vec ! [ SubstitutionPart { snippet, span: sp } ] }
788
+ } )
789
789
. collect ( ) ;
790
790
self . push_suggestion ( CodeSuggestion {
791
791
substitutions,
You can’t perform that action at this time.
0 commit comments