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 @@ -1432,10 +1432,11 @@ impl<'ast> ast::visit::Visit<'ast> for AnnotateTopLevelDefinitions<'_> {
14321432 let arguments_to_annotate = fun
14331433 . arguments
14341434 . iter ( )
1435- . filter ( |argument| argument. annotation . is_none ( ) ) ;
1436- let return_annotation_needed = fun. return_annotation . is_none ( ) ;
1435+ . filter ( |argument| argument. annotation . is_none ( ) )
1436+ . collect :: < Vec < _ > > ( ) ;
1437+ let needs_return_annotation = fun. return_annotation . is_none ( ) ;
14371438
1438- if arguments_to_annotate. is_empty ( ) && !return_annotation_needed {
1439+ if arguments_to_annotate. is_empty ( ) && !needs_return_annotation {
14391440 return ;
14401441 }
14411442
@@ -1465,7 +1466,7 @@ impl<'ast> ast::visit::Visit<'ast> for AnnotateTopLevelDefinitions<'_> {
14651466 }
14661467
14671468 // Annotate the return type if it isn't already annotated
1468- if return_annotation_needed {
1469+ if needs_return_annotation {
14691470 self . edits . insert (
14701471 fun. location . end ,
14711472 format ! ( " -> {}" , printer. print_type( & fun. return_type) ) ,
You can’t perform that action at this time.
0 commit comments