aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/path
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-01-15 17:32:34 +0000
committerGitHub <[email protected]>2020-01-15 17:32:34 +0000
commit2f1df3cd74603bf1ba7f2e1c8833407a176cc66e (patch)
tree3fd74d1aa420b04f5c9e3aaf84ebb62e553ddb9c /crates/ra_hir_def/src/path
parentc0661ce7444223b0fff1f5d54adb41022ab788cb (diff)
parent7d2d3ac3db6ea7bbb3d77569495176da3b2992e6 (diff)
Merge #2855
2855: More fluent API r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir_def/src/path')
-rw-r--r--crates/ra_hir_def/src/path/lower/lower_use.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir_def/src/path/lower/lower_use.rs b/crates/ra_hir_def/src/path/lower/lower_use.rs
index 3218eaf0a..531878174 100644
--- a/crates/ra_hir_def/src/path/lower/lower_use.rs
+++ b/crates/ra_hir_def/src/path/lower/lower_use.rs
@@ -84,7 +84,7 @@ fn convert_path(prefix: Option<ModPath>, path: ast::Path, hygiene: &Hygiene) ->
84 res 84 res
85 } 85 }
86 Either::Right(crate_id) => { 86 Either::Right(crate_id) => {
87 return Some(ModPath::from_simple_segments( 87 return Some(ModPath::from_segments(
88 PathKind::DollarCrate(crate_id), 88 PathKind::DollarCrate(crate_id),
89 iter::empty(), 89 iter::empty(),
90 )) 90 ))
@@ -95,19 +95,19 @@ fn convert_path(prefix: Option<ModPath>, path: ast::Path, hygiene: &Hygiene) ->
95 if prefix.is_some() { 95 if prefix.is_some() {
96 return None; 96 return None;
97 } 97 }
98 ModPath::from_simple_segments(PathKind::Crate, iter::empty()) 98 ModPath::from_segments(PathKind::Crate, iter::empty())
99 } 99 }
100 ast::PathSegmentKind::SelfKw => { 100 ast::PathSegmentKind::SelfKw => {
101 if prefix.is_some() { 101 if prefix.is_some() {
102 return None; 102 return None;
103 } 103 }
104 ModPath::from_simple_segments(PathKind::Super(0), iter::empty()) 104 ModPath::from_segments(PathKind::Super(0), iter::empty())
105 } 105 }
106 ast::PathSegmentKind::SuperKw => { 106 ast::PathSegmentKind::SuperKw => {
107 if prefix.is_some() { 107 if prefix.is_some() {
108 return None; 108 return None;
109 } 109 }
110 ModPath::from_simple_segments(PathKind::Super(1), iter::empty()) 110 ModPath::from_segments(PathKind::Super(1), iter::empty())
111 } 111 }
112 ast::PathSegmentKind::Type { .. } => { 112 ast::PathSegmentKind::Type { .. } => {
113 // not allowed in imports 113 // not allowed in imports