Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_expand/src/mod_path.rs')
-rw-r--r--crates/hir_expand/src/mod_path.rs12
1 files changed, 11 insertions, 1 deletions
diff --git a/crates/hir_expand/src/mod_path.rs b/crates/hir_expand/src/mod_path.rs
index 9c06a3f892..5e264d0398 100644
--- a/crates/hir_expand/src/mod_path.rs
+++ b/crates/hir_expand/src/mod_path.rs
@@ -5,7 +5,11 @@ use std::{
iter,
};
-use crate::{db::AstDatabase, hygiene::Hygiene, name::Name};
+use crate::{
+ db::AstDatabase,
+ hygiene::Hygiene,
+ name::{known, Name},
+};
use base_db::CrateId;
use either::Either;
use syntax::{ast, AstNode};
@@ -162,6 +166,12 @@ fn convert_path(
}
}
}
+ ast::PathSegmentKind::SelfTypeKw => {
+ if prefix.is_some() {
+ return None;
+ }
+ ModPath::from_segments(PathKind::Plain, Some(known::SELF_TYPE))
+ }
ast::PathSegmentKind::CrateKw => {
if prefix.is_some() {
return None;