Closed alexcrichton closed 7 years ago
cc @rust-lang/compiler
Captured a debug log from rustc_trans: https://gist.github.com/Mark-Simulacrum/55341cf99db2ab2c0739ead0533b7f28
Nominating for discussion. @alexcrichton how serious of a problem is this? (i.e., is it occurring a lot?)
@nikomatsakis I haven't myself run into this much, but maybe @conradev (reporter of the original issue) has run into it more?
I have only run into it in the situation from the original ticket (alexcrichton/futures-rs#393).
That said, @dwrensha also ran into the same error, but in a different situation: alexcrichton/futures-rs/issues/367 (I'm not sure how related it is, if at all)
I was able to shuffle things around a bit in my code to avoid the problem: https://github.com/dwrensha/zillions/commit/da6e69c87b1b28e817b2b4d13920e5ef333f70ee. Still, this is a very surprising and unhelpful error message to see, and I can imagine beginners getting quite confused upon seeing it.
triage: P-medium
Just going to plug my code here. It is a bit more of an elaborate example: https://github.com/cetra3/apache_log/tree/recursion_limit
Are there any settings we can set to bump up this so-called recursion limit? Or is it hard set in the compiler.
Ran into this as well... For what it's worth, it seems like the error message is a red herring - it doesn't look like it's a recursion depth problem, it just ends up with two ambiguous trait impls.
It appears that this was fixed by #45065.
Nice! I'll tag this as needstest so we can check in the test above
How would I test it out against my code? Has this landed in nightly?
Yes - at least, the reduced test case compiles fine with the latest nightly.
I've tested my code on the latest nightly. Compiles fine now!
Originally reported at https://github.com/alexcrichton/futures-rs/issues/393 I've minimized this example to a one-file reproduction.
I'm not really sure why it's hitting the limit so quickly, but is this a bug in the compiler or perhaps a bug in the futures crate?