aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/path.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def/src/path.rs')
-rw-r--r--crates/hir_def/src/path.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/hir_def/src/path.rs b/crates/hir_def/src/path.rs
index 0e60dc2b6..1dc085199 100644
--- a/crates/hir_def/src/path.rs
+++ b/crates/hir_def/src/path.rs
@@ -44,6 +44,10 @@ pub enum ImportAlias {
44} 44}
45 45
46impl ModPath { 46impl ModPath {
47 pub fn from_src_unhygienic(path: ast::Path) -> Option<ModPath> {
48 lower::lower_path(path, &Hygiene::new_unhygienic()).map(|it| it.mod_path)
49 }
50
47 pub fn from_src(path: ast::Path, hygiene: &Hygiene) -> Option<ModPath> { 51 pub fn from_src(path: ast::Path, hygiene: &Hygiene) -> Option<ModPath> {
48 lower::lower_path(path, hygiene).map(|it| it.mod_path) 52 lower::lower_path(path, hygiene).map(|it| it.mod_path)
49 } 53 }