Prevent caching projections in the case of cycles
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. Fixes #79714, a regresion from #79305 caused by the removal of `get_paranoid_cache_value_obligation`.
This commit is contained in:
parent
77fce67733
commit
2e92b13a60
11 changed files with 150 additions and 21 deletions
|
@ -291,6 +291,10 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
self.infcx.tcx
|
||||
}
|
||||
|
||||
pub(super) fn query_mode(&self) -> TraitQueryMode {
|
||||
self.query_mode
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Selection
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue