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.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/crates/hir_def/src/path/lower.rs b/crates/hir_def/src/path/lower.rs
index 3abc48d95d..49e55e03d1 100644
--- a/crates/hir_def/src/path/lower.rs
+++ b/crates/hir_def/src/path/lower.rs
@@ -1,7 +1,5 @@
//! Transforms syntax into `Path` objects, ideally with accounting for hygiene
-mod lower_use;
-
use crate::intern::Interned;
use either::Either;
@@ -15,8 +13,6 @@ use crate::{
type_ref::{LifetimeRef, TypeBound, TypeRef},
};
-pub(super) use lower_use::convert_path;
-
/// Converts an `ast::Path` to `Path`. Works with use trees.
/// It correctly handles `$crate` based path from macro call.
pub(super) fn lower_path(mut path: ast::Path, ctx: &LowerCtx) -> Option<Path> {
@@ -72,10 +68,10 @@ pub(super) fn lower_path(mut path: ast::Path, ctx: &LowerCtx) -> Option<Path> {
Some(trait_ref) => {
let Path { mod_path, generic_args: path_generic_args, .. } =
Path::from_src(trait_ref.path()?, ctx)?;
- let num_segments = mod_path.segments.len();
+ let num_segments = mod_path.segments().len();
kind = mod_path.kind;
- segments.extend(mod_path.segments.iter().cloned().rev());
+ segments.extend(mod_path.segments().iter().cloned().rev());
generic_args.extend(Vec::from(path_generic_args).into_iter().rev());
// Insert the type reference (T in the above example) as Self parameter for the trait