diff options
author | Edwin Cheng <[email protected]> | 2020-04-30 11:20:13 +0100 |
---|---|---|
committer | Edwin Cheng <[email protected]> | 2020-05-01 13:01:17 +0100 |
commit | bdcf6f56589f8367c8cc82f3f4f045dcaf53748d (patch) | |
tree | 805a0387fa06a0dd73b800cfd52a36a509a08bc2 /crates/ra_hir/src | |
parent | 1635d22a355b08309661e3d54d22c6bc2b53e5e1 (diff) |
Introduce LowerCtx for path lowering
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r-- | crates/ra_hir/src/lib.rs | 3 | ||||
-rw-r--r-- | crates/ra_hir/src/source_analyzer.rs | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/crates/ra_hir/src/lib.rs b/crates/ra_hir/src/lib.rs index 312ef3814..c5df4ac24 100644 --- a/crates/ra_hir/src/lib.rs +++ b/crates/ra_hir/src/lib.rs | |||
@@ -70,6 +70,7 @@ pub use hir_def::{ | |||
70 | type_ref::Mutability, | 70 | type_ref::Mutability, |
71 | }; | 71 | }; |
72 | pub use hir_expand::{ | 72 | pub use hir_expand::{ |
73 | name::Name, HirFileId, InFile, MacroCallId, MacroCallLoc, MacroDefId, MacroFile, Origin, | 73 | hygiene::Hygiene, name::Name, HirFileId, InFile, MacroCallId, MacroCallLoc, MacroDefId, |
74 | MacroFile, Origin, | ||
74 | }; | 75 | }; |
75 | pub use hir_ty::{display::HirDisplay, CallableDef}; | 76 | pub use hir_ty::{display::HirDisplay, CallableDef}; |
diff --git a/crates/ra_hir/src/source_analyzer.rs b/crates/ra_hir/src/source_analyzer.rs index 74d64c97d..c63d1b847 100644 --- a/crates/ra_hir/src/source_analyzer.rs +++ b/crates/ra_hir/src/source_analyzer.rs | |||
@@ -224,7 +224,8 @@ impl SourceAnalyzer { | |||
224 | } | 224 | } |
225 | } | 225 | } |
226 | // This must be a normal source file rather than macro file. | 226 | // This must be a normal source file rather than macro file. |
227 | let hir_path = crate::Path::from_ast(path.clone())?; | 227 | let hir_path = |
228 | crate::Path::from_src(path.clone(), &Hygiene::new(db.upcast(), self.file_id))?; | ||
228 | resolve_hir_path(db, &self.resolver, &hir_path) | 229 | resolve_hir_path(db, &self.resolver, &hir_path) |
229 | } | 230 | } |
230 | 231 | ||