aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_expand
diff options
context:
space:
mode:
authorEdwin Cheng <[email protected]>2020-03-11 03:04:02 +0000
committerEdwin Cheng <[email protected]>2020-03-11 03:04:02 +0000
commit6ea7c319154f9ec10721f4041afc9d07d6b2476b (patch)
treebdd64414df9950213cc117e2975d8fd17f85fbfc /crates/ra_hir_expand
parent5a292309c55639a12d10b3c37b9f800d8b802b6d (diff)
Add extern source
Diffstat (limited to 'crates/ra_hir_expand')
-rw-r--r--crates/ra_hir_expand/src/builtin_macro.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_hir_expand/src/builtin_macro.rs b/crates/ra_hir_expand/src/builtin_macro.rs
index 298ec22ff..a90007f26 100644
--- a/crates/ra_hir_expand/src/builtin_macro.rs
+++ b/crates/ra_hir_expand/src/builtin_macro.rs
@@ -262,7 +262,8 @@ fn relative_file(db: &dyn AstDatabase, call_id: MacroCallId, path: &str) -> Opti
262 262
263 // Extern paths ? 263 // Extern paths ?
264 let krate = db.relevant_crates(call_site).get(0)?.clone(); 264 let krate = db.relevant_crates(call_site).get(0)?.clone();
265 let (extern_source_id, relative_file) = db.crate_graph()[krate].env.extern_path(path)?; 265 let (extern_source_id, relative_file) =
266 db.crate_graph()[krate].extern_source.extern_path(path)?;
266 267
267 db.resolve_extern_path(extern_source_id, &relative_file) 268 db.resolve_extern_path(extern_source_id, &relative_file)
268} 269}