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:
Emilio Cobos Álvarez
2021-04-07 12:37:05 +02:00
parent 54dfcf89e4
commit 52de917d25
23 changed files with 96 additions and 9 deletions
+5
View File
@@ -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() { }
+5
View File
@@ -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() { }