Don't ICE when computing PointerLike trait when region vars are in param-env#111880
Conversation
|
r? @oli-obk (rustbot has picked a reviewer for you, use r? to override) |
|
Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor |
jackh726
left a comment
There was a problem hiding this comment.
Why erase rather than just checking if the goal has any infer?
|
@jackh726: There's no reason to treat this goal as ambiguous just because our param-env has early bound regions that get canonicalized into region vars. If we treated the presence of region vars as ambiguous, then something this would fail for no particularly good reason: To put it in other words, layout computation is done modulo regions anyways. |
|
@bors r+ |
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#111861 (Don't ICE on return-type notation when promoting trait preds to associated type bounds) - rust-lang#111864 (Always require closure parameters to be `Sized`) - rust-lang#111870 (Rename `traits_in_crate` query to `traits`) - rust-lang#111880 (Don't ICE when computing PointerLike trait when region vars are in param-env) - rust-lang#111887 (Add regression tests for pretty-printing inherent projections) r? `@ghost` `@rustbot` modify labels: rollup
| let self_ty = | ||
| tcx.erase_regions(tcx.erase_late_bound_regions(obligation.predicate.self_ty())); | ||
|
|
||
| let self_ty = tcx.erase_late_bound_regions(obligation.predicate.self_ty()); |
There was a problem hiding this comment.
that should ICE with non lifetime binders 🤔 also just style (and irrelevant perf) would prefer to first check for non_region_infer in the ParamEnvAnd and then erase regions.
Fixes #111877