aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/path.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-12-17 14:38:28 +0000
committerAleksey Kladov <[email protected]>2019-12-17 14:38:28 +0000
commitaca022f1d49a6d945f3ef4f8c781d7337120b68d (patch)
tree4cddf22d75fc1a9a3e8ff2863a1983348f193b26 /crates/ra_hir_def/src/path.rs
parent4a58522119955f36d95212be902fe3ab79c5e922 (diff)
Refactor PathKind
Diffstat (limited to 'crates/ra_hir_def/src/path.rs')
-rw-r--r--crates/ra_hir_def/src/path.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_hir_def/src/path.rs b/crates/ra_hir_def/src/path.rs
index 20d6d98ea..3b26e8337 100644
--- a/crates/ra_hir_def/src/path.rs
+++ b/crates/ra_hir_def/src/path.rs
@@ -56,7 +56,7 @@ impl ModPath {
56 } 56 }
57 57
58 pub fn is_self(&self) -> bool { 58 pub fn is_self(&self) -> bool {
59 self.kind == PathKind::Self_ && self.segments.is_empty() 59 self.kind == PathKind::Super(0) && self.segments.is_empty()
60 } 60 }
61 61
62 /// If this path is a single identifier, like `foo`, return its name. 62 /// If this path is a single identifier, like `foo`, return its name.
@@ -100,8 +100,7 @@ pub enum GenericArg {
100#[derive(Debug, Clone, PartialEq, Eq, Hash)] 100#[derive(Debug, Clone, PartialEq, Eq, Hash)]
101pub enum PathKind { 101pub enum PathKind {
102 Plain, 102 Plain,
103 Self_, 103 Super(u8),
104 Super,
105 Crate, 104 Crate,
106 // Absolute path 105 // Absolute path
107 Abs, 106 Abs,