We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fda52b8 commit 2932e09Copy full SHA for 2932e09
compiler/rustc_mir_transform/src/lib.rs
@@ -220,10 +220,8 @@ fn is_mir_available(tcx: TyCtxt<'_>, def_id: LocalDefId) -> bool {
220
/// Finds the full set of `DefId`s within the current crate that have
221
/// MIR associated with them.
222
fn mir_keys(tcx: TyCtxt<'_>, (): ()) -> FxIndexSet<LocalDefId> {
223
- let mut set = FxIndexSet::default();
224
-
225
// All body-owners have MIR associated with them.
226
- set.extend(tcx.hir().body_owners());
+ let mut set: FxIndexSet<_> = tcx.hir().body_owners().collect();
227
228
// Additionally, tuple struct/variant constructors have MIR, but
229
// they don't have a BodyId, so we need to build them separately.
0 commit comments