aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/path.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def/src/path.rs')
-rw-r--r--crates/ra_hir_def/src/path.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_hir_def/src/path.rs b/crates/ra_hir_def/src/path.rs
index ff252fe44..3030dcdf6 100644
--- a/crates/ra_hir_def/src/path.rs
+++ b/crates/ra_hir_def/src/path.rs
@@ -2,8 +2,8 @@
2 2
3use std::{iter, sync::Arc}; 3use std::{iter, sync::Arc};
4 4
5use either::Either;
5use hir_expand::{ 6use hir_expand::{
6 either::Either,
7 hygiene::Hygiene, 7 hygiene::Hygiene,
8 name::{self, AsName, Name}, 8 name::{self, AsName, Name},
9}; 9};
@@ -111,7 +111,7 @@ impl Path {
111 ast::PathSegmentKind::Name(name_ref) => { 111 ast::PathSegmentKind::Name(name_ref) => {
112 // FIXME: this should just return name 112 // FIXME: this should just return name
113 match hygiene.name_ref_to_name(name_ref) { 113 match hygiene.name_ref_to_name(name_ref) {
114 Either::A(name) => { 114 Either::Left(name) => {
115 let args = segment 115 let args = segment
116 .type_arg_list() 116 .type_arg_list()
117 .and_then(GenericArgs::from_ast) 117 .and_then(GenericArgs::from_ast)
@@ -125,7 +125,7 @@ impl Path {
125 let segment = PathSegment { name, args_and_bindings: args }; 125 let segment = PathSegment { name, args_and_bindings: args };
126 segments.push(segment); 126 segments.push(segment);
127 } 127 }
128 Either::B(crate_id) => { 128 Either::Right(crate_id) => {
129 kind = PathKind::DollarCrate(crate_id); 129 kind = PathKind::DollarCrate(crate_id);
130 break; 130 break;
131 } 131 }
@@ -347,7 +347,7 @@ fn convert_path(prefix: Option<Path>, path: ast::Path, hygiene: &Hygiene) -> Opt
347 let res = match segment.kind()? { 347 let res = match segment.kind()? {
348 ast::PathSegmentKind::Name(name_ref) => { 348 ast::PathSegmentKind::Name(name_ref) => {
349 match hygiene.name_ref_to_name(name_ref) { 349 match hygiene.name_ref_to_name(name_ref) {
350 Either::A(name) => { 350 Either::Left(name) => {
351 // no type args in use 351 // no type args in use
352 let mut res = prefix.unwrap_or_else(|| Path { 352 let mut res = prefix.unwrap_or_else(|| Path {
353 kind: PathKind::Plain, 353 kind: PathKind::Plain,
@@ -359,7 +359,7 @@ fn convert_path(prefix: Option<Path>, path: ast::Path, hygiene: &Hygiene) -> Opt
359 }); 359 });
360 res 360 res
361 } 361 }
362 Either::B(crate_id) => { 362 Either::Right(crate_id) => {
363 return Some(Path::from_simple_segments( 363 return Some(Path::from_simple_segments(
364 PathKind::DollarCrate(crate_id), 364 PathKind::DollarCrate(crate_id),
365 iter::empty(), 365 iter::empty(),