aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/data.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2019-12-13 20:43:53 +0000
committerFlorian Diebold <[email protected]>2019-12-13 21:33:37 +0000
commit259c42f00e2e85594c7373166bc8467ce375a045 (patch)
treee3c3c855a4bcb7ba425f9d788a9a383a529557c3 /crates/ra_hir_def/src/data.rs
parent169fe4932f84f396965a4814c44e31061673937c (diff)
Add macros for known names and paths
Diffstat (limited to 'crates/ra_hir_def/src/data.rs')
-rw-r--r--crates/ra_hir_def/src/data.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir_def/src/data.rs b/crates/ra_hir_def/src/data.rs
index b2dac183e..afeac0ec2 100644
--- a/crates/ra_hir_def/src/data.rs
+++ b/crates/ra_hir_def/src/data.rs
@@ -3,7 +3,7 @@
3use std::sync::Arc; 3use std::sync::Arc;
4 4
5use hir_expand::{ 5use hir_expand::{
6 name::{self, AsName, Name}, 6 name::{AsName, Name, N},
7 AstId, 7 AstId,
8}; 8};
9use ra_syntax::ast::{self, NameOwner, TypeAscriptionOwner}; 9use ra_syntax::ast::{self, NameOwner, TypeAscriptionOwner};
@@ -37,7 +37,7 @@ impl FunctionData {
37 let self_type = if let Some(type_ref) = self_param.ascribed_type() { 37 let self_type = if let Some(type_ref) = self_param.ascribed_type() {
38 TypeRef::from_ast(type_ref) 38 TypeRef::from_ast(type_ref)
39 } else { 39 } else {
40 let self_type = TypeRef::Path(name::SELF_TYPE.into()); 40 let self_type = TypeRef::Path(N![Self].into());
41 match self_param.kind() { 41 match self_param.kind() {
42 ast::SelfParamKind::Owned => self_type, 42 ast::SelfParamKind::Owned => self_type,
43 ast::SelfParamKind::Ref => { 43 ast::SelfParamKind::Ref => {