aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-08-01 12:49:36 +0100
committerGitHub <[email protected]>2020-08-01 12:49:36 +0100
commitcf17366df97d460f246f69d06fbfb129074d1a5c (patch)
treecb6e4783b74d04ae2188fb04b652488e97429b99 /crates/ra_hir_def
parent5af32aeb2b83c7ae8adf3e088bf4f3691aa45eb1 (diff)
parentbff8dd094958f1abe2fcfe8fe9f15dc7a7e6b53e (diff)
Merge #5642
5642: Grammar updates r=matklad a=matklad bors r+ Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir_def')
-rw-r--r--crates/ra_hir_def/src/type_ref.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir_def/src/type_ref.rs b/crates/ra_hir_def/src/type_ref.rs
index fe6619d9f..6f7884ffe 100644
--- a/crates/ra_hir_def/src/type_ref.rs
+++ b/crates/ra_hir_def/src/type_ref.rs
@@ -94,7 +94,7 @@ impl TypeRef {
94 .map(TypeRef::Path) 94 .map(TypeRef::Path)
95 .unwrap_or(TypeRef::Error) 95 .unwrap_or(TypeRef::Error)
96 } 96 }
97 ast::Type::PointerType(inner) => { 97 ast::Type::PtrType(inner) => {
98 let inner_ty = TypeRef::from_ast_opt(&ctx, inner.ty()); 98 let inner_ty = TypeRef::from_ast_opt(&ctx, inner.ty());
99 let mutability = Mutability::from_mutable(inner.mut_token().is_some()); 99 let mutability = Mutability::from_mutable(inner.mut_token().is_some());
100 TypeRef::RawPtr(Box::new(inner_ty), mutability) 100 TypeRef::RawPtr(Box::new(inner_ty), mutability)
@@ -105,13 +105,13 @@ impl TypeRef {
105 ast::Type::SliceType(inner) => { 105 ast::Type::SliceType(inner) => {
106 TypeRef::Slice(Box::new(TypeRef::from_ast_opt(&ctx, inner.ty()))) 106 TypeRef::Slice(Box::new(TypeRef::from_ast_opt(&ctx, inner.ty())))
107 } 107 }
108 ast::Type::ReferenceType(inner) => { 108 ast::Type::RefType(inner) => {
109 let inner_ty = TypeRef::from_ast_opt(&ctx, inner.ty()); 109 let inner_ty = TypeRef::from_ast_opt(&ctx, inner.ty());
110 let mutability = Mutability::from_mutable(inner.mut_token().is_some()); 110 let mutability = Mutability::from_mutable(inner.mut_token().is_some());
111 TypeRef::Reference(Box::new(inner_ty), mutability) 111 TypeRef::Reference(Box::new(inner_ty), mutability)
112 } 112 }
113 ast::Type::InferType(_inner) => TypeRef::Placeholder, 113 ast::Type::InferType(_inner) => TypeRef::Placeholder,
114 ast::Type::FnPointerType(inner) => { 114 ast::Type::FnPtrType(inner) => {
115 let ret_ty = inner 115 let ret_ty = inner
116 .ret_type() 116 .ret_type()
117 .and_then(|rt| rt.ty()) 117 .and_then(|rt| rt.ty())