rust/compiler/rustc_trait_selection/src
bors 931aa27922 Auto merge of #80246 - matthewjasper:projection-cycle-caching, r=Mark-Simulacrum
Prevent caching normalization results with a cycle

When normalizing a projection which results in a cycle, we would cache the result of `project_type` without the nested obligations (because they're not needed for inference). This would result in the nested obligations only being handled once in fulfill, which would avoid the cycle error. `get_paranoid_cache_value_obligation` used to add an obligation that resulted in a cycle in this case previously, but was removed by #73905.

This PR makes the projection cache not cache the value of a projection if it was ever normalized in a cycle (except in a snapshot that's rolled back).

Fixes #79714.

r? `@nikomatsakis`
2020-12-26 00:11:30 +00:00
..
traits Auto merge of #80246 - matthewjasper:projection-cycle-caching, r=Mark-Simulacrum 2020-12-26 00:11:30 +00:00
autoderef.rs compiler: fold by value 2020-11-16 22:34:57 +01:00
infer.rs compiler: fold by value 2020-11-16 22:34:57 +01:00
lib.rs TypeVisitor: use ControlFlow in rustc_{infer,lint,trait_selection} 2020-10-30 12:27:34 +01:00
opaque_types.rs Remove extra call to upvar_tys 2020-11-29 19:11:20 -05:00