aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/data.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-12-14 14:08:08 +0000
committerGitHub <[email protected]>2019-12-14 14:08:08 +0000
commit77db6177658b32f69ad7ebfdef96c1b3b2893fdd (patch)
tree2a9f0f16b34821dfe4319bef410e177311e87f16 /crates/ra_hir_def/src/data.rs
parent7238037de42a2fd88434930c521b926d7b0026da (diff)
parentf02fcc16444fcd18ccd51b43fa01bf0233e044fa (diff)
Merge #2554
2554: Add macros for known names and paths r=matklad a=flodiebold Co-authored-by: Florian Diebold <[email protected]>
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..4f4ef57cc 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::{name, AsName, Name},
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(name![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 => {