diff options
Diffstat (limited to 'crates/hir_def/src/path.rs')
-rw-r--r-- | crates/hir_def/src/path.rs | 4 |
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 | ||
46 | impl ModPath { | 46 | impl 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 | } |