aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def
diff options
context:
space:
mode:
authorKirill Bulatov <[email protected]>2021-02-28 07:57:54 +0000
committerKirill Bulatov <[email protected]>2021-03-08 21:59:20 +0000
commit9482353fa8e1e88cb720a029b9bb6304819c7399 (patch)
tree6438293e05f70af6106b4e421ec0afe7d586632c /crates/hir_def
parentd386481fac65e988fa4d13c1bc8d4ddb2bc490c6 (diff)
Properly handle turbofishes in qualifiers
Diffstat (limited to 'crates/hir_def')
-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 }