diff options
author | Lukas Wirth <[email protected]> | 2020-11-03 19:54:44 +0000 |
---|---|---|
committer | Lukas Wirth <[email protected]> | 2020-11-03 19:57:04 +0000 |
commit | 6145234450cc3e8d79c7f4e2105e36ccd96ee3b4 (patch) | |
tree | c3e31323dce3ca25fecca617e8a57362097f5389 /crates/ide/src | |
parent | dc9842b64fa2c273bd46d60280222bec9dfd87cf (diff) |
Support struct variants in extract_struct_from_enum_variant
Diffstat (limited to 'crates/ide/src')
-rw-r--r-- | crates/ide/src/diagnostics/fixes.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ide/src/diagnostics/fixes.rs b/crates/ide/src/diagnostics/fixes.rs index 02e17ba43..d275dd75b 100644 --- a/crates/ide/src/diagnostics/fixes.rs +++ b/crates/ide/src/diagnostics/fixes.rs | |||
@@ -157,7 +157,8 @@ fn missing_record_expr_field_fix( | |||
157 | return None; | 157 | return None; |
158 | } | 158 | } |
159 | let new_field = make::record_field( | 159 | let new_field = make::record_field( |
160 | record_expr_field.field_name()?, | 160 | None, |
161 | make::name(record_expr_field.field_name()?.text()), | ||
161 | make::ty(&new_field_type.display_source_code(sema.db, module.into()).ok()?), | 162 | make::ty(&new_field_type.display_source_code(sema.db, module.into()).ok()?), |
162 | ); | 163 | ); |
163 | 164 | ||