Auto merge of #91230 - eggyal:fallible-type-fold, r=jackh726
Make `TypeFolder::fold_*` return `Result` Implements rust-lang/compiler-team#432. Initially this is just a rebase of `@LeSeulArtichaut's` work in #85469 (abandoned; see https://github.com/rust-lang/rust/pull/85485#issuecomment-908781112). At that time, it caused a regression in performance that required some further exploration... with this rebased PR bors can hopefully report some perf analysis from which we can investigate further (if the regression is indeed still present). r? `@jackh726` cc `@nikomatsakis`
This commit is contained in:
@@ -2222,6 +2222,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
||||
.predicate
|
||||
.to_poly_trait_ref()
|
||||
.fold_with(&mut self.freshener)
|
||||
.into_ok()
|
||||
.with_constness(obligation.predicate.skip_binder().constness);
|
||||
|
||||
let dfn = previous_stack.cache.next_dfn();
|
||||
|
||||
Reference in New Issue
Block a user