georust / geo

Geospatial primitives and algorithms for Rust
https://crates.io/crates/geo
Other
1.51k stars 195 forks source link

Nightly build error with `1.71.0-nightly` #1013

Closed bwsw closed 1 year ago

bwsw commented 1 year ago

Hello, I have geo in my project as a dependency for a while. Never saw the problems compiling it (in 1.69 works normally). However, today I tried to run benchmarks with nightly 1.71 and the compilation failed.

It only fails with:

[profile.bench]
opt-level = 3

works with:

[profile.bench]
opt-level = 2

You may want to take a look at the project to discover it personally: https://github.com/insight-platform/savant-rs

Try running benches with (crash):

cargo bench --no-default-features  -- --nocapture

then, try running tests (no opt-level, works):

cargo test --no-default-features  -- --nocapture

then, change opt-level to 2 and it compiles again.

Here is the error. Maybe it worth looking at it to make the code compatible with the future compiler version:

error[E0275]: overflow evaluating the requirement `[closure@/home/administrator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/geo-0.24.1/src/algorithm/map_coords.rs:855:69: 855:72]: Fn<(geo_types::Coord<T>,)>`
  |
  = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`geo`)
  = note: required for `&[closure@/home/administrator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/geo-0.24.1/src/algorithm/map_coords.rs:855:69: 855:72]` to implement `Fn<(geo_types::Coord<T>,)>`
  = note: 128 redundant requirements hidden
  = note: required for `&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&...` to implement `Fn<(geo_types::Coord<T>,)>`
  = note: the full type name has been written to '/home/administrator/savant-rs/target/release/deps/geo-0b15e21f3bd03f19.long-type-9889855519783608144.txt'

For more information about this error, try `rustc --explain E0275`.
error: could not compile `geo` (lib) due to previous error
michaelkirk commented 1 year ago

Dupe of #1010?

Can you try with the latest (as of yet unreleased) geo?

michaelkirk commented 1 year ago

This should be fixed with #1012 which was released just now in geo v0.25.0