diff options
author | Aleksey Kladov <[email protected]> | 2020-07-30 19:51:43 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-07-30 19:51:43 +0100 |
commit | 2e2642efccd5855e4158b01a006e7884a96982bb (patch) | |
tree | de4342a453b3b504178dd17c46fab3e1d6e995d2 /crates/ra_hir_def/src/item_tree | |
parent | fbe60a2e284035d16c2a1ee743ee88db418689aa (diff) |
Remove TypeAscriptionOwner
Diffstat (limited to 'crates/ra_hir_def/src/item_tree')
-rw-r--r-- | crates/ra_hir_def/src/item_tree/lower.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_hir_def/src/item_tree/lower.rs b/crates/ra_hir_def/src/item_tree/lower.rs index 29f1de547..f0ced1f79 100644 --- a/crates/ra_hir_def/src/item_tree/lower.rs +++ b/crates/ra_hir_def/src/item_tree/lower.rs | |||
@@ -209,7 +209,7 @@ impl Ctx { | |||
209 | fn lower_record_field(&mut self, field: &ast::RecordField) -> Option<Field> { | 209 | fn lower_record_field(&mut self, field: &ast::RecordField) -> Option<Field> { |
210 | let name = field.name()?.as_name(); | 210 | let name = field.name()?.as_name(); |
211 | let visibility = self.lower_visibility(field); | 211 | let visibility = self.lower_visibility(field); |
212 | let type_ref = self.lower_type_ref_opt(field.ascribed_type()); | 212 | let type_ref = self.lower_type_ref_opt(field.ty()); |
213 | let res = Field { name, type_ref, visibility }; | 213 | let res = Field { name, type_ref, visibility }; |
214 | Some(res) | 214 | Some(res) |
215 | } | 215 | } |
@@ -286,7 +286,7 @@ impl Ctx { | |||
286 | let mut has_self_param = false; | 286 | let mut has_self_param = false; |
287 | if let Some(param_list) = func.param_list() { | 287 | if let Some(param_list) = func.param_list() { |
288 | if let Some(self_param) = param_list.self_param() { | 288 | if let Some(self_param) = param_list.self_param() { |
289 | let self_type = match self_param.ascribed_type() { | 289 | let self_type = match self_param.ty() { |
290 | Some(type_ref) => TypeRef::from_ast(&self.body_ctx, type_ref), | 290 | Some(type_ref) => TypeRef::from_ast(&self.body_ctx, type_ref), |
291 | None => { | 291 | None => { |
292 | let self_type = TypeRef::Path(name![Self].into()); | 292 | let self_type = TypeRef::Path(name![Self].into()); |
@@ -305,7 +305,7 @@ impl Ctx { | |||
305 | has_self_param = true; | 305 | has_self_param = true; |
306 | } | 306 | } |
307 | for param in param_list.params() { | 307 | for param in param_list.params() { |
308 | let type_ref = TypeRef::from_ast_opt(&self.body_ctx, param.ascribed_type()); | 308 | let type_ref = TypeRef::from_ast_opt(&self.body_ctx, param.ty()); |
309 | params.push(type_ref); | 309 | params.push(type_ref); |
310 | } | 310 | } |
311 | } | 311 | } |
@@ -370,7 +370,7 @@ impl Ctx { | |||
370 | 370 | ||
371 | fn lower_static(&mut self, static_: &ast::Static) -> Option<FileItemTreeId<Static>> { | 371 | fn lower_static(&mut self, static_: &ast::Static) -> Option<FileItemTreeId<Static>> { |
372 | let name = static_.name()?.as_name(); | 372 | let name = static_.name()?.as_name(); |
373 | let type_ref = self.lower_type_ref_opt(static_.ascribed_type()); | 373 | let type_ref = self.lower_type_ref_opt(static_.ty()); |
374 | let visibility = self.lower_visibility(static_); | 374 | let visibility = self.lower_visibility(static_); |
375 | let mutable = static_.mut_token().is_some(); | 375 | let mutable = static_.mut_token().is_some(); |
376 | let ast_id = self.source_ast_id_map.ast_id(static_); | 376 | let ast_id = self.source_ast_id_map.ast_id(static_); |
@@ -380,7 +380,7 @@ impl Ctx { | |||
380 | 380 | ||
381 | fn lower_const(&mut self, konst: &ast::Const) -> FileItemTreeId<Const> { | 381 | fn lower_const(&mut self, konst: &ast::Const) -> FileItemTreeId<Const> { |
382 | let name = konst.name().map(|it| it.as_name()); | 382 | let name = konst.name().map(|it| it.as_name()); |
383 | let type_ref = self.lower_type_ref_opt(konst.ascribed_type()); | 383 | let type_ref = self.lower_type_ref_opt(konst.ty()); |
384 | let visibility = self.lower_visibility(konst); | 384 | let visibility = self.lower_visibility(konst); |
385 | let ast_id = self.source_ast_id_map.ast_id(konst); | 385 | let ast_id = self.source_ast_id_map.ast_id(konst); |
386 | let res = Const { name, visibility, type_ref, ast_id }; | 386 | let res = Const { name, visibility, type_ref, ast_id }; |