Skip to content

Commit 94525e5

Browse files
committed
Dual proc macros: Use crate disambiguator from the target crate
Not sure this is correct, but let's try.
1 parent 2d827b0 commit 94525e5

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/librustc_metadata/creader.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -229,14 +229,12 @@ impl<'a> CrateLoader<'a> {
229229
let dependencies: Vec<CrateNum> = cnum_map.iter().cloned().collect();
230230

231231
let raw_proc_macros = crate_root.proc_macro_data.map(|_| {
232-
let temp_root;
233-
let (dlsym_dylib, dlsym_root) = match &host_lib {
234-
Some(host_lib) =>
235-
(&host_lib.dylib, { temp_root = host_lib.metadata.get_root(); &temp_root }),
236-
None => (&dylib, &crate_root),
232+
let dlsym_dylib = match &host_lib {
233+
Some(host_lib) => &host_lib.dylib,
234+
None => &dylib,
237235
};
238236
let dlsym_dylib = dlsym_dylib.as_ref().expect("no dylib for a proc-macro crate");
239-
self.dlsym_proc_macros(&dlsym_dylib.0, dlsym_root.disambiguator, span)
237+
self.dlsym_proc_macros(&dlsym_dylib.0, crate_root.disambiguator, span)
240238
});
241239

242240
let interpret_alloc_index: Vec<u32> = crate_root.interpret_alloc_index

0 commit comments

Comments
 (0)