diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-01 18:28:12 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-01 18:28:12 +0100 |
commit | ec1d1a1b709a6eafff07077cdf75291d01cda3b6 (patch) | |
tree | c5a3b33cb40cc4141c19c7ad2271c65a90abf0b4 /crates/ra_hir_def/src/item_tree/lower.rs | |
parent | 43dfd29d8db8acc13efa1da3ddaa4cad2363dea9 (diff) | |
parent | 4ef1d533bd26876125199208349701c2369c965c (diff) |
Merge #5179
5179: ItemTree: Lower fields despite invalid type r=jonas-schievink a=jonas-schievink
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/5147
bors r+
Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/ra_hir_def/src/item_tree/lower.rs')
-rw-r--r-- | crates/ra_hir_def/src/item_tree/lower.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_hir_def/src/item_tree/lower.rs b/crates/ra_hir_def/src/item_tree/lower.rs index 5149dd141..06743d7fc 100644 --- a/crates/ra_hir_def/src/item_tree/lower.rs +++ b/crates/ra_hir_def/src/item_tree/lower.rs | |||
@@ -211,7 +211,7 @@ impl Ctx { | |||
211 | fn lower_record_field(&mut self, field: &ast::RecordFieldDef) -> Option<Field> { | 211 | fn lower_record_field(&mut self, field: &ast::RecordFieldDef) -> Option<Field> { |
212 | let name = field.name()?.as_name(); | 212 | let name = field.name()?.as_name(); |
213 | let visibility = self.lower_visibility(field); | 213 | let visibility = self.lower_visibility(field); |
214 | let type_ref = self.lower_type_ref(&field.ascribed_type()?); | 214 | let type_ref = self.lower_type_ref_opt(field.ascribed_type()); |
215 | let res = Field { name, type_ref, visibility }; | 215 | let res = Field { name, type_ref, visibility }; |
216 | Some(res) | 216 | Some(res) |
217 | } | 217 | } |