rust-random / rand

A Rust library for random number generation.
https://crates.io/crates/rand
Other
1.6k stars 423 forks source link

Put macro `x86_intrinsic_impl` behind x86 configuration #1431

Closed MichaelOwenDyer closed 3 months ago

MichaelOwenDyer commented 3 months ago

Summary

The macro x86_intrinsic_impl in src/distributions/integer.rs is only ever used inside this configuration: #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] but the macro itself is declared without that configuration. I just added it, and removed a file-level import which was only used inside the macro.

Motivation

This should resolve the unused code warnings currently occurring on master.

Details

See changes

MichaelOwenDyer commented 3 months ago

I'm gonna go ahead and merge this @dhardy