Rollup merge of #152444 - ShoyuVanilla:unsized-recursion-limit, r=lcnr
`-Znext-solver` Prevent committing unfulfilled unsized coercion Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/266 r? lcnr
This commit is contained in:
commit
0c0af5c6a8
4 changed files with 84 additions and 3 deletions
|
|
@ -443,9 +443,10 @@ impl<'a, 'tcx> InspectGoal<'a, 'tcx> {
|
|||
pub(crate) fn visit_with<V: ProofTreeVisitor<'tcx>>(&self, visitor: &mut V) -> V::Result {
|
||||
if self.depth < visitor.config().max_depth {
|
||||
try_visit!(visitor.visit_goal(self));
|
||||
V::Result::output()
|
||||
} else {
|
||||
visitor.on_recursion_limit()
|
||||
}
|
||||
|
||||
V::Result::output()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -460,6 +461,10 @@ pub trait ProofTreeVisitor<'tcx> {
|
|||
}
|
||||
|
||||
fn visit_goal(&mut self, goal: &InspectGoal<'_, 'tcx>) -> Self::Result;
|
||||
|
||||
fn on_recursion_limit(&mut self) -> Self::Result {
|
||||
Self::Result::output()
|
||||
}
|
||||
}
|
||||
|
||||
#[extension(pub trait InferCtxtProofTreeExt<'tcx>)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue