Make evaluate_obligation
not succeed unconditionally if it registered new hidden types for opaque types
This commit is contained in:
parent
ade2a96ff1
commit
84fc551664
8 changed files with 31 additions and 11 deletions
|
@ -394,6 +394,10 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
Err(_) => return Ok(EvaluatedToErr),
|
||||
}
|
||||
|
||||
if self.infcx.opaque_types_added_in_snapshot(snapshot) {
|
||||
return Ok(result.max(EvaluatedToOkModuloOpaqueTypes));
|
||||
}
|
||||
|
||||
match self.infcx.region_constraints_added_in_snapshot(snapshot) {
|
||||
None => Ok(result),
|
||||
Some(_) => Ok(result.max(EvaluatedToOkModuloRegions)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue