rust-lang / futures-rs

Zero-cost asynchronous programming in Rust
https://rust-lang.github.io/futures-rs/
Apache License 2.0
5.39k stars 625 forks source link

Chaining streams triggers "reached the recursion limit during monomorphization" #424

Closed cetra3 closed 7 years ago

cetra3 commented 7 years ago

Using this branch here: https://github.com/cetra3/apache_log/tree/recursion_limit

Trying to compile renders the following message:

cargo build
   Compiling apache_log v0.2.0 (file:///Users/cetra/Desktop/apache_log)
error: reached the recursion limit during monomorphization (selection ambiguity)

error: Could not compile `apache_log`.

I'm wondering if there is another way to accomplish what I'm trying to do, or whether there is some setting I can set to increase the recursion limit

alexcrichton commented 7 years ago

May be related to https://github.com/alexcrichton/futures-rs/issues/367 or https://github.com/alexcrichton/futures-rs/issues/393 or https://github.com/rust-lang/rust/issues/40003. I'd love to work around these errors but unfortunately I'm not sure how to do so :(

cetra3 commented 7 years ago

I've posted in the main rust issue, there's no point leaving this issue open, as it appears to be a compiler bug. There might be some crazy setting you can set to bump this up.