Euclid 0.22.11 fails to build due to the occurrences of num_traits::real or num_traits::Float when neither std nor libm is enabled.
Reproduction
- Rust 1.85 is used.
> rustc --version --verbose
rustc 1.85.0 (4d91de4e4 2025-02-17)
binary: rustc
commit-hash: 4d91de4e48198da2e33413efdcd9cd2cc0c46688
commit-date: 2025-02-17
host: aarch64-apple-darwin
release: 1.85.0
LLVM version: 19.1.7
- Clone
euclid.
git clone https://github.com/servo/euclid
- Checkout to the 0.22.11 commit ed102fa.
git checkout ed102fa314115820ee22d47e587a38ef6c4c7826
- Build with default features disabled.
cargo build --no-default-features
Result
Compiling euclid v0.22.11 (/Users/paxbun/Projects/Others/euclid)
error[E0432]: unresolved import `num_traits::real`
--> src/angle.rs:20:17
|
20 | use num_traits::real::Real;
| ^^^^ could not find `real` in `num_traits`
|
note: found an item that was configured out
--> /Users/paxbun/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/lib.rs:62:9
|
62 | pub mod real;
| ^^^^
note: the item is gated here
--> /Users/paxbun/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/real.rs:1:1
|
1 | #![cfg(any(feature = "std", feature = "libm"))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0432]: unresolved import `num_traits::Float`
--> src/angle.rs:21:18
|
21 | use num_traits::{Float, FloatConst, NumCast, One, Zero};
| ^^^^^
| |
| no `Float` in the root
| help: a similar name exists in the module (notice the capitalization): `float`
|
note: found an item that was configured out
--> /Users/paxbun/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/lib.rs:32:23
|
32 | pub use crate::float::Float;
| ^^^^^
note: the item is gated here
--> /Users/paxbun/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/lib.rs:31:1
|
31 | #[cfg(any(feature = "std", feature = "libm"))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
Some errors have detailed explanations: E0432, E0433.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `euclid` (lib) due to 28 previous errors
Euclid 0.22.11 fails to build due to the occurrences of
num_traits::realornum_traits::Floatwhen neitherstdnorlibmis enabled.Reproduction
euclid.Result