diff options
Diffstat (limited to 'crates/hir_def/src/path.rs')
-rw-r--r-- | crates/hir_def/src/path.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir_def/src/path.rs b/crates/hir_def/src/path.rs index 64bff318e..a43441b1c 100644 --- a/crates/hir_def/src/path.rs +++ b/crates/hir_def/src/path.rs | |||
@@ -49,7 +49,7 @@ pub enum ImportAlias { | |||
49 | impl ModPath { | 49 | impl ModPath { |
50 | pub fn from_src(db: &dyn DefDatabase, path: ast::Path, hygiene: &Hygiene) -> Option<ModPath> { | 50 | pub fn from_src(db: &dyn DefDatabase, path: ast::Path, hygiene: &Hygiene) -> Option<ModPath> { |
51 | let ctx = LowerCtx::with_hygiene(db, hygiene); | 51 | let ctx = LowerCtx::with_hygiene(db, hygiene); |
52 | lower::lower_path(db, path, &ctx).map(|it| (*it.mod_path).clone()) | 52 | lower::lower_path(path, &ctx).map(|it| (*it.mod_path).clone()) |
53 | } | 53 | } |
54 | 54 | ||
55 | pub fn from_segments(kind: PathKind, segments: impl IntoIterator<Item = Name>) -> ModPath { | 55 | pub fn from_segments(kind: PathKind, segments: impl IntoIterator<Item = Name>) -> ModPath { |
@@ -169,8 +169,8 @@ pub enum GenericArg { | |||
169 | impl Path { | 169 | impl Path { |
170 | /// Converts an `ast::Path` to `Path`. Works with use trees. | 170 | /// Converts an `ast::Path` to `Path`. Works with use trees. |
171 | /// It correctly handles `$crate` based path from macro call. | 171 | /// It correctly handles `$crate` based path from macro call. |
172 | pub fn from_src(db: &dyn DefDatabase, path: ast::Path, ctx: &LowerCtx) -> Option<Path> { | 172 | pub fn from_src(path: ast::Path, ctx: &LowerCtx) -> Option<Path> { |
173 | lower::lower_path(db, path, ctx) | 173 | lower::lower_path(path, ctx) |
174 | } | 174 | } |
175 | 175 | ||
176 | /// Converts a known mod path to `Path`. | 176 | /// Converts a known mod path to `Path`. |