Make P parameter explicit
This commit is contained in:
parent
11ec3eca74
commit
412dc28d6a
14 changed files with 62 additions and 49 deletions
|
@ -739,8 +739,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
// stack would be `T: Auto`.
|
||||
let cycle = stack.iter().take_while(|s| s.depth > stack_arg.1);
|
||||
let tcx = self.tcx();
|
||||
let cycle =
|
||||
cycle.map(|stack| stack.obligation.predicate.upcast(tcx));
|
||||
let cycle = cycle.map(|stack| stack.obligation.predicate.upcast(tcx));
|
||||
if self.coinductive_match(cycle) {
|
||||
stack.update_reached_depth(stack_arg.1);
|
||||
return Ok(EvaluatedToOk);
|
||||
|
@ -1379,7 +1378,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
error_obligation: &Obligation<'tcx, T>,
|
||||
) -> Result<(), OverflowError>
|
||||
where
|
||||
T: Upcast<'tcx> + Clone,
|
||||
T: Upcast<'tcx, ty::Predicate<'tcx>> + Clone,
|
||||
{
|
||||
if !self.infcx.tcx.recursion_limit().value_within_limit(depth) {
|
||||
match self.query_mode {
|
||||
|
@ -1408,7 +1407,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
error_obligation: &Obligation<'tcx, V>,
|
||||
) -> Result<(), OverflowError>
|
||||
where
|
||||
V: Upcast<'tcx> + Clone,
|
||||
V: Upcast<'tcx, ty::Predicate<'tcx>> + Clone,
|
||||
{
|
||||
self.check_recursion_depth(obligation.recursion_depth, error_obligation)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue