aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/item_tree/lower.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-07-30 20:03:25 +0100
committerGitHub <[email protected]>2020-07-30 20:03:25 +0100
commit239dd506f68db0cbe4417b6e5c7f737d8ff8a159 (patch)
treedd3503a2be3a6699a6b111844dbcdc85b37e2425 /crates/ra_hir_def/src/item_tree/lower.rs
parent134d3c3c5068abc5ed3e03fe5df2b524ea70753d (diff)
parentf95f425ae4199e814e6956be1d9bb59a14758c07 (diff)
Merge #5613
5613: Use ty to access most TypeRefs r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[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.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir_def/src/item_tree/lower.rs b/crates/ra_hir_def/src/item_tree/lower.rs
index f0ced1f79..feb31579e 100644
--- a/crates/ra_hir_def/src/item_tree/lower.rs
+++ b/crates/ra_hir_def/src/item_tree/lower.rs
@@ -228,7 +228,7 @@ impl Ctx {
228 fn lower_tuple_field(&mut self, idx: usize, field: &ast::TupleField) -> Field { 228 fn lower_tuple_field(&mut self, idx: usize, field: &ast::TupleField) -> Field {
229 let name = Name::new_tuple_field(idx); 229 let name = Name::new_tuple_field(idx);
230 let visibility = self.lower_visibility(field); 230 let visibility = self.lower_visibility(field);
231 let type_ref = self.lower_type_ref_opt(field.type_ref()); 231 let type_ref = self.lower_type_ref_opt(field.ty());
232 let res = Field { name, type_ref, visibility }; 232 let res = Field { name, type_ref, visibility };
233 res 233 res
234 } 234 }
@@ -317,7 +317,7 @@ impl Ctx {
317 } 317 }
318 } 318 }
319 319
320 let ret_type = match func.ret_type().and_then(|rt| rt.type_ref()) { 320 let ret_type = match func.ret_type().and_then(|rt| rt.ty()) {
321 Some(type_ref) => TypeRef::from_ast(&self.body_ctx, type_ref), 321 Some(type_ref) => TypeRef::from_ast(&self.body_ctx, type_ref),
322 _ => TypeRef::unit(), 322 _ => TypeRef::unit(),
323 }; 323 };
@@ -352,7 +352,7 @@ impl Ctx {
352 type_alias: &ast::TypeAlias, 352 type_alias: &ast::TypeAlias,
353 ) -> Option<FileItemTreeId<TypeAlias>> { 353 ) -> Option<FileItemTreeId<TypeAlias>> {
354 let name = type_alias.name()?.as_name(); 354 let name = type_alias.name()?.as_name();
355 let type_ref = type_alias.type_ref().map(|it| self.lower_type_ref(&it)); 355 let type_ref = type_alias.ty().map(|it| self.lower_type_ref(&it));
356 let visibility = self.lower_visibility(type_alias); 356 let visibility = self.lower_visibility(type_alias);
357 let bounds = self.lower_type_bounds(type_alias); 357 let bounds = self.lower_type_bounds(type_alias);
358 let generic_params = self.lower_generic_params(GenericsOwner::TypeAlias, type_alias); 358 let generic_params = self.lower_generic_params(GenericsOwner::TypeAlias, type_alias);