aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/path/lower.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-07-31 11:18:53 +0100
committerGitHub <[email protected]>2020-07-31 11:18:53 +0100
commit683d0a4d93c29c988c40c001a4b574d8f0dcb9c6 (patch)
tree1d5bb4ce799c6377b49ae73436d50a087db53392 /crates/ra_hir_def/src/path/lower.rs
parent6b7cb8b5ab539fc4333ce34bc29bf77c976f232a (diff)
parent08ea2271e8050165d0aaf4c994ed3dd746aff3ba (diff)
Merge #5618
5618: Rename TypeRef -> Type r=matklad a=matklad The TypeRef name comes from IntelliJ days, where you often have both type *syntax* as well as *semantical* representation of types in scope. And naming both Type is confusing. In rust-analyzer however, we use ast types as `ast::Type`, and have many more semantic counterparts to ast types, so avoiding name clash here is just confusing. bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir_def/src/path/lower.rs')
-rw-r--r--crates/ra_hir_def/src/path/lower.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir_def/src/path/lower.rs b/crates/ra_hir_def/src/path/lower.rs
index 07d17916a..257f9a033 100644
--- a/crates/ra_hir_def/src/path/lower.rs
+++ b/crates/ra_hir_def/src/path/lower.rs
@@ -152,7 +152,7 @@ pub(super) fn lower_generic_args(
152) -> Option<GenericArgs> { 152) -> Option<GenericArgs> {
153 let mut args = Vec::new(); 153 let mut args = Vec::new();
154 for type_arg in node.type_args() { 154 for type_arg in node.type_args() {
155 let type_ref = TypeRef::from_ast_opt(lower_ctx, type_arg.type_ref()); 155 let type_ref = TypeRef::from_ast_opt(lower_ctx, type_arg.ty());
156 args.push(GenericArg::Type(type_ref)); 156 args.push(GenericArg::Type(type_ref));
157 } 157 }
158 // lifetimes ignored for now 158 // lifetimes ignored for now
@@ -161,7 +161,7 @@ pub(super) fn lower_generic_args(
161 let assoc_type_arg: ast::AssocTypeArg = assoc_type_arg; 161 let assoc_type_arg: ast::AssocTypeArg = assoc_type_arg;
162 if let Some(name_ref) = assoc_type_arg.name_ref() { 162 if let Some(name_ref) = assoc_type_arg.name_ref() {
163 let name = name_ref.as_name(); 163 let name = name_ref.as_name();
164 let type_ref = assoc_type_arg.type_ref().map(|it| TypeRef::from_ast(lower_ctx, it)); 164 let type_ref = assoc_type_arg.ty().map(|it| TypeRef::from_ast(lower_ctx, it));
165 let bounds = if let Some(l) = assoc_type_arg.type_bound_list() { 165 let bounds = if let Some(l) = assoc_type_arg.type_bound_list() {
166 l.bounds().map(|it| TypeBound::from_ast(lower_ctx, it)).collect() 166 l.bounds().map(|it| TypeBound::from_ast(lower_ctx, it)).collect()
167 } else { 167 } else {