parser: Fix handling of #[path] attributes inside inline submodules.
As seen in hashbrown:
#[cfg(feature = "raw")]
/// Experimental and unsafe `RawTable` API. This module is only available if the
/// `raw` feature is enabled.
pub mod raw {
// The RawTable API is still experimental and is not properly documented yet.
#[allow(missing_docs)]
#[path = "mod.rs"]
mod inner;
pub use inner::*;
#[cfg(feature = "rayon")]
pub mod rayon {
pub use crate::external_trait_impls::rayon::raw::*;
}
}
This commit is contained in:
@@ -10,3 +10,5 @@ typedef struct ExportMe {
|
||||
} ExportMe;
|
||||
|
||||
void export_me(struct ExportMe *val);
|
||||
|
||||
void from_really_nested_mod(void);
|
||||
|
||||
@@ -15,6 +15,8 @@ extern "C" {
|
||||
|
||||
void export_me(struct ExportMe *val);
|
||||
|
||||
void from_really_nested_mod(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -10,3 +10,5 @@ typedef struct {
|
||||
} ExportMe;
|
||||
|
||||
void export_me(ExportMe *val);
|
||||
|
||||
void from_really_nested_mod(void);
|
||||
|
||||
@@ -15,6 +15,8 @@ extern "C" {
|
||||
|
||||
void export_me(ExportMe *val);
|
||||
|
||||
void from_really_nested_mod(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -14,4 +14,6 @@ extern "C" {
|
||||
|
||||
void export_me(ExportMe *val);
|
||||
|
||||
void from_really_nested_mod();
|
||||
|
||||
} // extern "C"
|
||||
|
||||
@@ -12,3 +12,5 @@ cdef extern from *:
|
||||
uint64_t val;
|
||||
|
||||
void export_me(ExportMe *val);
|
||||
|
||||
void from_really_nested_mod();
|
||||
|
||||
@@ -10,3 +10,5 @@ struct ExportMe {
|
||||
};
|
||||
|
||||
void export_me(struct ExportMe *val);
|
||||
|
||||
void from_really_nested_mod(void);
|
||||
|
||||
@@ -15,6 +15,8 @@ extern "C" {
|
||||
|
||||
void export_me(struct ExportMe *val);
|
||||
|
||||
void from_really_nested_mod(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -12,3 +12,5 @@ cdef extern from *:
|
||||
uint64_t val;
|
||||
|
||||
void export_me(ExportMe *val);
|
||||
|
||||
void from_really_nested_mod();
|
||||
|
||||
@@ -16,3 +16,5 @@ typedef struct ExportMe2 {
|
||||
void export_me(struct ExportMe *val);
|
||||
|
||||
void export_me_2(struct ExportMe2*);
|
||||
|
||||
void from_really_nested_mod(void);
|
||||
|
||||
@@ -21,6 +21,8 @@ void export_me(struct ExportMe *val);
|
||||
|
||||
void export_me_2(struct ExportMe2*);
|
||||
|
||||
void from_really_nested_mod(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -16,3 +16,5 @@ typedef struct {
|
||||
void export_me(ExportMe *val);
|
||||
|
||||
void export_me_2(ExportMe2*);
|
||||
|
||||
void from_really_nested_mod(void);
|
||||
|
||||
@@ -21,6 +21,8 @@ void export_me(ExportMe *val);
|
||||
|
||||
void export_me_2(ExportMe2*);
|
||||
|
||||
void from_really_nested_mod(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -20,4 +20,6 @@ void export_me(ExportMe *val);
|
||||
|
||||
void export_me_2(ExportMe2*);
|
||||
|
||||
void from_really_nested_mod();
|
||||
|
||||
} // extern "C"
|
||||
|
||||
@@ -17,3 +17,5 @@ cdef extern from *:
|
||||
void export_me(ExportMe *val);
|
||||
|
||||
void export_me_2(ExportMe2*);
|
||||
|
||||
void from_really_nested_mod();
|
||||
|
||||
@@ -16,3 +16,5 @@ struct ExportMe2 {
|
||||
void export_me(struct ExportMe *val);
|
||||
|
||||
void export_me_2(struct ExportMe2*);
|
||||
|
||||
void from_really_nested_mod(void);
|
||||
|
||||
@@ -21,6 +21,8 @@ void export_me(struct ExportMe *val);
|
||||
|
||||
void export_me_2(struct ExportMe2*);
|
||||
|
||||
void from_really_nested_mod(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -17,3 +17,5 @@ cdef extern from *:
|
||||
void export_me(ExportMe *val);
|
||||
|
||||
void export_me_2(ExportMe2*);
|
||||
|
||||
void from_really_nested_mod();
|
||||
|
||||
@@ -1 +1,6 @@
|
||||
pub mod other;
|
||||
|
||||
mod other3 {
|
||||
#[path = "other4.rs"]
|
||||
mod other4;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn from_really_nested_mod() { }
|
||||
@@ -2,3 +2,8 @@ pub mod other;
|
||||
|
||||
#[path = "other2.rs"]
|
||||
pub mod other2;
|
||||
|
||||
pub mod other3 {
|
||||
#[path = "other4.rs"]
|
||||
pub mod other4;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn from_really_nested_mod() { }
|
||||
Reference in New Issue
Block a user