about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-04-01 21:28:39 +0000
committerbors <bors@rust-lang.org>2025-04-01 21:28:39 +0000
commit9b7d5ac8180f70110e94f92ccbf8fa2263d24c73 (patch)
treecce198e428fef23c04ff18ed73617b8bf8f80dc8 /compiler/rustc_mir_transform/src
parente2014e876e3efaa69bf51c19579adb16c3df5f81 (diff)
parent99826dd9c79a8603b0f88d0b091cc86d0dec523f (diff)
downloadrust-9b7d5ac8180f70110e94f92ccbf8fa2263d24c73.tar.gz
rust-9b7d5ac8180f70110e94f92ccbf8fa2263d24c73.zip
Auto merge of #139220 - matthiaskrgr:rollup-v1un5wz, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #110406 (rustdoc-json: Add test for #[automatically_derived] attribute)
 - #138790 (Note potential but private items in show_candidates)
 - #139002 (Add release notes for 1.86.0)
 - #139022 (increment depth of nested obligations)
 - #139129 (Add tests for slice bounds check optimization)
 - #139188 (PassWrapper: adapt for llvm/llvm-project@94122d58fc77079a291a3d008914…)
 - #139193 (Feed HIR for by-move coroutine body def, since the inliner tries to read its attrs)
 - #139202 (Improve docs of ValTreeKind)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_mir_transform/src')
-rw-r--r--compiler/rustc_mir_transform/src/coroutine/by_move_body.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_mir_transform/src/coroutine/by_move_body.rs b/compiler/rustc_mir_transform/src/coroutine/by_move_body.rs
index 89a306c6104..dd0e07f2218 100644
--- a/compiler/rustc_mir_transform/src/coroutine/by_move_body.rs
+++ b/compiler/rustc_mir_transform/src/coroutine/by_move_body.rs
@@ -219,6 +219,8 @@ pub(crate) fn coroutine_by_move_body_def_id<'tcx>(
         mir::MirSource::from_instance(InstanceKind::Item(body_def.def_id().to_def_id()));
     dump_mir(tcx, false, "built", &"after", &by_move_body, |_, _| Ok(()));
 
+    // Feed HIR because we try to access this body's attrs in the inliner.
+    body_def.feed_hir();
     // Inherited from the by-ref coroutine.
     body_def.codegen_fn_attrs(tcx.codegen_fn_attrs(coroutine_def_id).clone());
     body_def.coverage_attr_on(tcx.coverage_attr_on(coroutine_def_id));