Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_def/src/path/lower.rs')
| -rw-r--r-- | crates/hir_def/src/path/lower.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/hir_def/src/path/lower.rs b/crates/hir_def/src/path/lower.rs index 49e55e03d1..f99b97178b 100644 --- a/crates/hir_def/src/path/lower.rs +++ b/crates/hir_def/src/path/lower.rs @@ -3,7 +3,7 @@ use crate::intern::Interned; use either::Either; -use hir_expand::name::{name, AsName}; +use hir_expand::name::{known, name, AsName}; use syntax::ast::{self, AstNode, HasTypeBounds}; use super::AssociatedTypeBinding; @@ -53,6 +53,10 @@ pub(super) fn lower_path(mut path: ast::Path, ctx: &LowerCtx) -> Option<Path> { } } } + ast::PathSegmentKind::SelfTypeKw => { + segments.push(known::SELF_TYPE); + generic_args.push(None) + } ast::PathSegmentKind::Type { type_ref, trait_ref } => { assert!(path.qualifier().is_none()); // this can only occur at the first segment |