gimli-rs / gimli

A library for reading and writing the DWARF debugging format
https://docs.rs/gimli/
Apache License 2.0
853 stars 108 forks source link

src/read/abbrev.rs: Mark mod tests as pub(crate) #694

Closed Enselic closed 10 months ago

Enselic commented 10 months ago

Fixes "warning: private item shadows public glob re-export" when doing "cargo test". Before the fix, the warning looks like this:

warning: private item shadows public glob re-export
   --> src/read/mod.rs:681:1
    |
681 | / mod tests {
682 | |     use super::*;
683 | |     use crate::common::Format;
684 | |     use crate::endianity::LittleEndian;
...   |
826 | |     }
827 | | }
    | |_^
    |
note: the name `tests` in the type namespace is supposed to be publicly re-exported here
   --> src/read/mod.rs:208:9
    |
208 | pub use self::abbrev::*;
    |         ^^^^^^^^^^^^^^^
note: but the private item here shadows it
   --> src/read/mod.rs:681:1
    |
681 | / mod tests {
682 | |     use super::*;
683 | |     use crate::common::Format;
684 | |     use crate::endianity::LittleEndian;
...   |
826 | |     }
827 | | }
    | |_^
    = note: `#[warn(hidden_glob_reexports)]` on by default

With the fix, there is no warning.