Skip to content

Commit

Permalink
Allow unused imports for some statements to remove warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
myl7 committed Aug 17, 2024
1 parent e7daf4f commit 67d56c1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/unix/linux_like/emscripten/lfs64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,12 @@ pub unsafe extern "C" fn mmap64(
//
// These aliases are mostly fine though, neither function takes a LFS64-namespaced type as an
// argument, nor do their names clash with any declared types.
//
// Targets wasm32-unknown-emscripten in CI recognize them as unused imports.
// Like the same one at src/unix/linux_like/linux/musl/lfs64.rs, here they are also allowed.
#[allow(unused_imports)]
pub use open as open64;
#[allow(unused_imports)]
pub use openat as openat64;

#[inline]
Expand Down
5 changes: 5 additions & 0 deletions src/unix/linux_like/linux/musl/lfs64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,12 @@ pub unsafe extern "C" fn mmap64(
//
// These aliases are mostly fine though, neither function takes a LFS64-namespaced type as an
// argument, nor do their names clash with any declared types.
//
// Targets i686-unknown-linux-musl and arm-unknown-linux-musleabihf in CI recognize them as unused imports.
// Since `dead_code` is already allowed at the crate level, here they are also allowed.
#[allow(unused_imports)]
pub use open as open64;
#[allow(unused_imports)]
pub use openat as openat64;

#[inline]
Expand Down

0 comments on commit 67d56c1

Please sign in to comment.