georust / geo

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

Problems building with Rust 1.75.0 #1131

Closed scouten closed 6 months ago

scouten commented 6 months ago

Building a project that uses this crate with Rust 1.75.0 yields the following error:

error[E0275]: overflow evaluating the requirement `{closure@/.../.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@map_coords.rs:855:69}` to implement `Fn<(geo_types::Coord<T>,)>`
  = note: the full type name has been written to '/path/to/project/target/release/deps/geo-a9a4fe9f25be15c0.long-type-16678154573059289262.txt'
  = note: 128 redundant requirements hidden
  = note: required for `&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&...` to implement `Fn<(geo_types::Coord<T>,)>`
  = note: the full type name has been written to '/path/to/project/target/release/deps/geo-a9a4fe9f25be15c0.long-type-4269842089778828156.txt'

Building the same project with Rust version forced to 1.74.0 is successful.

scouten commented 6 months ago

Never mind. I had an old version of geo listed in my Cargo.toml. Updated to 0.27.0 and it's OK now.