File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
crates/ide/src/diagnostics Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,8 @@ impl DiagnosticWithFix for MissingFields {
68
68
}
69
69
70
70
let root = sema. db . parse_or_expand ( self . file ) ?;
71
- let old_field_list = self . field_list_parent . to_node ( & root) . record_expr_field_list ( ) ?;
71
+ let field_list_parent = self . field_list_parent . to_node ( & root) ;
72
+ let old_field_list = field_list_parent. record_expr_field_list ( ) ?;
72
73
let mut new_field_list = old_field_list. clone ( ) ;
73
74
for f in self . missed_fields . iter ( ) {
74
75
let field =
@@ -85,7 +86,7 @@ impl DiagnosticWithFix for MissingFields {
85
86
Some ( Fix :: new (
86
87
"Fill struct fields" ,
87
88
SourceFileEdit { file_id : self . file . original_file ( sema. db ) , edit } . into ( ) ,
88
- sema. original_range ( & old_field_list . syntax ( ) ) . range ,
89
+ sema. original_range ( & field_list_parent . syntax ( ) ) . range ,
89
90
) )
90
91
}
91
92
}
You can’t perform that action at this time.
0 commit comments