parser: Fix resolution of #[path] dependencies from certain modules.

We need the current mod dir to resolve #[path], not the one we get for
rust 2018.

Fixes #599
This commit is contained in:
Emilio Cobos Álvarez
2020-11-30 19:27:51 +01:00
parent 9f558e30f3
commit fbc2237b7d
12 changed files with 87 additions and 12 deletions
+3
View File
@@ -1 +1,4 @@
pub mod other;
#[path = "other2.rs"]
pub mod other2;
+7
View File
@@ -0,0 +1,7 @@
#[repr(C)]
pub struct ExportMe2 {
val: u64
}
#[no_mangle]
pub unsafe extern "C" fn export_me_2(_: *mut ExportMe2) { }