-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
rust-2021-incompatible-closure-captures trait evaluation overflow error #88103
Comments
@arora-aman don't think I have much context on this one either |
I think the problem here is that we are using rust/compiler/rustc_typeck/src/check/upvar.rs Lines 796 to 803 in 0e41c62
But that uses
which is the variant that aborts on overflow rust/compiler/rustc_trait_selection/src/traits/query/evaluate_obligation.rs Lines 22 to 29 in 0e41c62
we could write into Scanning where
So, my proposed fix is that we change |
…akis type_implements_trait consider obligation failure on overflow Fixes: rust-lang#88103
…akis type_implements_trait consider obligation failure on overflow Fixes: rust-lang#88103
…akis type_implements_trait consider obligation failure on overflow Fixes: rust-lang#88103
While trying to migrate
sv-parser
0.11.1 to the 2021 edition, the compiler fails with this error:It is hard to create a small reproduction, but here is the command to run in that package to reproduce the error:
I'm not sure if it is feasible to avoid this. I'm guessing that the lint is doing some kind of trait evaluation that happens to add some additional recursion that is not normally there. Adding
#![recursion_limit="256"]
fixes the problem. Opening this issue to track whether or not there is anything to do here.Note that the lint doesn't actually fire, so this is just during the analysis (presumably somewhere in
compute_2229_migrations
).Full error:
Meta
rustc --version --verbose
:cc @rust-lang/wg-rfc-2229
The text was updated successfully, but these errors were encountered: