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 7036077 commit b5a0503Copy full SHA for b5a0503
compiler/rustc_mir_transform/src/lib.rs
@@ -219,10 +219,8 @@ fn is_mir_available(tcx: TyCtxt<'_>, def_id: LocalDefId) -> bool {
219
/// Finds the full set of `DefId`s within the current crate that have
220
/// MIR associated with them.
221
fn mir_keys(tcx: TyCtxt<'_>, (): ()) -> FxIndexSet<LocalDefId> {
222
- let mut set = FxIndexSet::default();
223
-
224
// All body-owners have MIR associated with them.
225
- set.extend(tcx.hir().body_owners());
+ let mut set: FxIndexSet<_> = tcx.hir().body_owners().collect();
226
227
// Additionally, tuple struct/variant constructors have MIR, but
228
// they don't have a BodyId, so we need to build them separately.
0 commit comments