Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Since 2023-04-21 (fec9adcdb), nightly fails to compile geo crate in release mode with [E0275] #110776

Closed
tim3z opened this issue Apr 24, 2023 · 3 comments
Labels
C-bug Category: This is a bug. E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc

Comments

@tim3z
Copy link

tim3z commented Apr 24, 2023

I tried the following:

git clone https://github.com/georust/geo.git && cd geo # main or latest release (tag 0.24.1) both have the issue
rustup run nightly-2023-04-22 cargo build --release

I expected to see this happen: It compiles 🤷‍♂️

Instead, I get the following compiler error:

error[E0275]: overflow evaluating the requirement `[closure@geo/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@geo/src/algorithm/map_coords.rs:855:69: 855:72]` to implement `Fn<(geo_types::Coord<T>,)>`
  = note: 128 redundant requirements hidden
  = note: required for `&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&[closure@geo/src/algorithm/map_coords.rs:855:69: 855:72]` to implement `Fn<(geo_types::Coord<T>,)>`

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

Adding the suggested #![recursion_limit = "256"] does not help. I checked up to #![recursion_limit = "1024"] but it started getting veeeery slow.

However, all of the following work just fine:

rustup run nightly-2023-04-22 cargo build # no --release
rustup run nightly-2023-04-21 cargo build # one day before
rustup run stable cargo build --release # stable 1.69
@tim3z tim3z added the C-bug Category: This is a bug. label Apr 24, 2023
@tim3z tim3z changed the title Since 2023-04-21 (fec9adcdb), nightly fails to compile geo crate in release mode with [E0275] Since 2023-04-21 (fec9adcdb), nightly fails to compile geo crate in release mode with [E0275] Apr 24, 2023
@saethlin saethlin added the E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc label Apr 25, 2023
@saethlin
Copy link
Member

It looks like the code in question: https://github.com/georust/geo/blob/c31ac453ac6565cf17f9d983ab16a892b8b1e451/geo/src/algorithm/map_coords.rs#L851 is trivially recursive?

I think this has the same root cause as #110475 if nothing else it looks incredibly similar.

@tim3z
Copy link
Author

tim3z commented Apr 25, 2023

Yeah, seems pretty much like exactly that.

@jyn514
Copy link
Member

jyn514 commented Apr 26, 2023

I'm going to close this as a duplicate of #110475.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc
Projects
None yet
Development

No branches or pull requests

3 participants