about summary refs log tree commit diff
path: root/compiler/rustc_driver/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-06-04 18:25:23 +0000
committerbors <bors@rust-lang.org>2023-06-04 18:25:23 +0000
commit2f1b7cedcf5044ba620646c6758bbb99f46b8d95 (patch)
tree02d99bfb992f95b21ebb779d541dbdf020a3d29c /compiler/rustc_driver/src
parent5545961df2d23ead445de4ba86a67b0c15bd09a8 (diff)
parentf549cacc1d3fb09fd682fa4e0c29d45e8bd179a3 (diff)
downloadrust-2f1b7cedcf5044ba620646c6758bbb99f46b8d95.tar.gz
rust-2f1b7cedcf5044ba620646c6758bbb99f46b8d95.zip
Auto merge of #14971 - lowr:fix/captured-item-ty-outer-binder, r=HKalbasi
fix: consider outer binders when folding captured items' type

Fixes #14966

Basically, the crash is caused by us producing a broken type and passing it to chalk: `&dyn for<type> [for<> Implemented(^1.0: A<^0.0>)]` (notice the innermost bound var `^0.0` has no corresponding binder). It's created in `CapturedItemWithoutTy::with_ty()`, which didn't consider outer binders when folding types to replace placeholders with bound variables.

The fix is one-liner, but I've also refactored the surrounding code a little.
Diffstat (limited to 'compiler/rustc_driver/src')
0 files changed, 0 insertions, 0 deletions