-
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
Regression in 1.56.0 - Trait bound not satisfied error even though the impl exists #90662
Comments
@rustbot modify labels: +regression-from-stable-to-stable |
Bisects to #85868. cc @Aaron1011 @jackh726 searched nightlies: from nightly-2021-07-01 to nightly-2021-10-01 bisected with cargo-bisect-rustc v0.6.0Host triple: x86_64-apple-darwin cargo bisect-rustc --preserve --regress=error --start=2021-07-01 --end=2021-10-01 -- check |
Assigning priority as discussed in the Zulip thread of the Prioritization Working Group. @rustbot label -I-prioritize +P-high |
Any advancements on this issue? I currently can't upgrade to Rust 1.56 due to this exact problem |
I might try my hand at diagnosing it, but someone with more context would definitely be faster at it. |
Sorry for the delay in getting to this. I've opened #91183 with a fix. |
The existing `InferCtxt` may already have in-progress projections for some of the predicates we may (recursively evaluate). This can cause us to incorrect produce (and cache!) `EvaluatedToRecur`, leading us to incorrectly mark a predicate as unimplemented. We now create a fresh `InferCtxt` for each sub-obligation that we 'speculatively' evaluate. This causes us to miss out on some legitimate caching opportunities, but ensures that our speculative evaluation cannot pollute any of the caches from the 'real' `InferCtxt`. The evaluation can still update *global* caches, but our global caches don't have any notion of 'in progress', so this is fine. Fixes rust-lang#90662
I noticed that this regression was found in the 1.56 beta crater run: Was it just overlooked at that time? |
…on, r=jackh726 Remove 'speculative evaluation' of predicates Performing 'speculative evaluation' introduces caching bugs that cannot be fixed without invasive changes to projection. Hopefully, we can win back most of the performance lost by re-adding 'cache completion' Fixes rust-lang#90662
Seems kinda major to
Yeah, this seems rather significant. It's right there in the results. https://crater-reports.s3.amazonaws.com/beta-1.56-3/beta-2021-10-15/reg/shaku-0.6.1/log.txt |
Code
I tried this code (minimized from this test in my library):
I expected to see this happen: Compile without errors.
Instead, this happened: Compiled with errors:
Note that it says
HasProvider<(dyn Repository + 'static)>
is not implemented forTestModule
, but then lists it as an existing implementation.Version it worked on
It most recently worked on: 1.55.0
Version with regression
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: