diff options
| author | bors <bors@rust-lang.org> | 2023-09-13 22:21:27 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-09-13 22:21:27 +0000 |
| commit | d5c2e9c342b358556da91d61ed4133f6f50fc0c3 (patch) | |
| tree | deb699298bf1099d5cd455e3b03c70fe5db546cd /compiler/rustc_mir_transform/src | |
| parent | 5680fa18feaa87f3ff04063800aec256c3d4b4be (diff) | |
| parent | 7900923b259380461d21071e2fbd0c604338fb9c (diff) | |
| download | rust-1.72.1.tar.gz rust-1.72.1.zip | |
Auto merge of #115787 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum 1.72.1
[stable] 1.72.1 release This backports: * Remove assert that checks type equality #115215 * implied bounds: do not ICE on unconstrained region vars #115559 * rustdoc: correctly deal with self ty params when eliding default object lifetimes #115276 * Stop emitting non-power-of-two vectors in (non-portable-SIMD) codegen #115236 * Normalize before checking if local is freeze in deduced_param_attrs #114948 Some cherry-picks required merge conflict resolution, we'll see if I got it right based on CI (rustdoc fix and LLVM codegen test). r? `@Mark-Simulacrum`
Diffstat (limited to 'compiler/rustc_mir_transform/src')
| -rw-r--r-- | compiler/rustc_mir_transform/src/deduce_param_attrs.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/rustc_mir_transform/src/deduce_param_attrs.rs b/compiler/rustc_mir_transform/src/deduce_param_attrs.rs index a133c9d4782..e782c037376 100644 --- a/compiler/rustc_mir_transform/src/deduce_param_attrs.rs +++ b/compiler/rustc_mir_transform/src/deduce_param_attrs.rs @@ -203,7 +203,12 @@ pub fn deduced_param_attrs<'tcx>( body.local_decls.iter().skip(1).take(body.arg_count).enumerate().map( |(arg_index, local_decl)| DeducedParamAttrs { read_only: !deduce_read_only.mutable_args.contains(arg_index) - && local_decl.ty.is_freeze(tcx, param_env), + // We must normalize here to reveal opaques and normalize + // their substs, otherwise we'll see exponential blow-up in + // compile times: #113372 + && tcx + .normalize_erasing_regions(param_env, local_decl.ty) + .is_freeze(tcx, param_env), }, ), ); |
