File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
compiler-core/src/language_server Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1433,10 +1433,11 @@ impl<'ast> ast::visit::Visit<'ast> for AnnotateTopLevelDefinitions<'_> {
14331433 let arguments_to_annotate = fun
14341434 . arguments
14351435 . iter ( )
1436- . filter ( |argument| argument. annotation . is_none ( ) ) ;
1437- let return_annotation_needed = fun. return_annotation . is_none ( ) ;
1436+ . filter ( |argument| argument. annotation . is_none ( ) )
1437+ . collect :: < Vec < _ > > ( ) ;
1438+ let needs_return_annotation = fun. return_annotation . is_none ( ) ;
14381439
1439- if arguments_to_annotate. is_empty ( ) && !return_annotation_needed {
1440+ if arguments_to_annotate. is_empty ( ) && !needs_return_annotation {
14401441 return ;
14411442 }
14421443
@@ -1466,7 +1467,7 @@ impl<'ast> ast::visit::Visit<'ast> for AnnotateTopLevelDefinitions<'_> {
14661467 }
14671468
14681469 // Annotate the return type if it isn't already annotated
1469- if return_annotation_needed {
1470+ if needs_return_annotation {
14701471 self . edits . insert (
14711472 fun. location . end ,
14721473 format ! ( " -> {}" , printer. print_type( & fun. return_type) ) ,
You can’t perform that action at this time.
0 commit comments