diff options
| author | bors <bors@rust-lang.org> | 2023-03-02 14:04:22 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-03-02 14:04:22 +0000 |
| commit | 7e966bcd03f6d0fae41f58cf80bcb10566ab971a (patch) | |
| tree | e506c2d96410294010e4767e40b397f55460b540 /compiler/rustc_hir_analysis/src | |
| parent | 18caf88956ecf454e24307e598b8ac9967f10b07 (diff) | |
| parent | 832987bb1e0691b44a057414d57d23c64e6c7d97 (diff) | |
| download | rust-7e966bcd03f6d0fae41f58cf80bcb10566ab971a.tar.gz rust-7e966bcd03f6d0fae41f58cf80bcb10566ab971a.zip | |
Auto merge of #108640 - matthiaskrgr:rollup-rii4t5t, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - #108516 (Restrict `#[rustc_box]` to `Box::new` calls) - #108575 (Erase **all** regions when probing for associated types on ambiguity in astconv) - #108585 (Run compiler test suite in parallel on Fuchsia) - #108606 (Add test case for mismatched open/close delims) - #108609 (Highlight whole expression for E0599) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_hir_analysis/src')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/astconv/mod.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_hir_analysis/src/astconv/mod.rs b/compiler/rustc_hir_analysis/src/astconv/mod.rs index 25c467bfd2b..f5ce02c9e61 100644 --- a/compiler/rustc_hir_analysis/src/astconv/mod.rs +++ b/compiler/rustc_hir_analysis/src/astconv/mod.rs @@ -2399,8 +2399,10 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { infcx .can_eq( ty::ParamEnv::empty(), - tcx.erase_regions(impl_.self_ty()), - tcx.erase_regions(qself_ty), + impl_.self_ty(), + // Must fold past escaping bound vars too, + // since we have those at this point in astconv. + tcx.fold_regions(qself_ty, |_, _| tcx.lifetimes.re_erased), ) }) && tcx.impl_polarity(impl_def_id) != ty::ImplPolarity::Negative |
