diff options
author | Lukas Wirth <[email protected]> | 2021-01-15 17:57:32 +0000 |
---|---|---|
committer | Lukas Wirth <[email protected]> | 2021-01-15 18:21:23 +0000 |
commit | cb863390f23bc2eac6561d55def9bd3ba54605fc (patch) | |
tree | b19b39d9b6231e8857a4096cc803cf35e2ddbe81 /crates/hir_def | |
parent | 0c58aa9dc0e24f0fa6a6ee7eb0c35041dedddb0a (diff) |
Handle self/super/crate in PathSegment as NameRef
Diffstat (limited to 'crates/hir_def')
-rw-r--r-- | crates/hir_def/src/resolver.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir_def/src/resolver.rs b/crates/hir_def/src/resolver.rs index 61059c349..85ddc2c47 100644 --- a/crates/hir_def/src/resolver.rs +++ b/crates/hir_def/src/resolver.rs | |||
@@ -258,7 +258,7 @@ impl Resolver { | |||
258 | ) -> Option<ResolveValueResult> { | 258 | ) -> Option<ResolveValueResult> { |
259 | let n_segments = path.segments.len(); | 259 | let n_segments = path.segments.len(); |
260 | let tmp = name![self]; | 260 | let tmp = name![self]; |
261 | let first_name = if path.is_self() { &tmp } else { &path.segments.first()? }; | 261 | let first_name = if path.is_self() { &tmp } else { path.segments.first()? }; |
262 | let skip_to_mod = path.kind != PathKind::Plain && !path.is_self(); | 262 | let skip_to_mod = path.kind != PathKind::Plain && !path.is_self(); |
263 | for scope in self.scopes.iter().rev() { | 263 | for scope in self.scopes.iter().rev() { |
264 | match scope { | 264 | match scope { |