Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace pub type with pub use (fixes #257) #259

Merged
merged 2 commits into from Feb 15, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 19 additions & 9 deletions src/elf/mod.rs
Expand Up @@ -69,15 +69,15 @@ if_sylvan! {
use alloc::vec::Vec;
use core::cmp;

pub type Header = header::Header;
pub type ProgramHeader = program_header::ProgramHeader;
pub type SectionHeader = section_header::SectionHeader;
pub type Symtab<'a> = sym::Symtab<'a>;
pub type Sym = sym::Sym;
pub type Dyn = dynamic::Dyn;
pub type Dynamic = dynamic::Dynamic;
pub type Reloc = reloc::Reloc;
pub type RelocSection<'a> = reloc::RelocSection<'a>;
pub use header::Header;
pub use program_header::ProgramHeader;
pub use section_header::SectionHeader;
pub use sym::Symtab;
pub use sym::Sym;
pub use dynamic::Dyn;
pub use dynamic::Dynamic;
pub use reloc::Reloc;
pub use reloc::RelocSection;

pub type ProgramHeaders = Vec<ProgramHeader>;
pub type SectionHeaders = Vec<SectionHeader>;
Expand Down Expand Up @@ -505,4 +505,14 @@ mod tests {
}
}
}

// See https://github.com/m4b/goblin/issues/257
#[test]
#[allow(unused)]
fn no_use_statement_conflict() {
use crate::elf::section_header::*;
use crate::elf::*;

fn f(_: SectionHeader) {}
}
}