Skip to content

Commit 1c9ddd2

Browse files
committed
move item query inside if stmt
1 parent e2512f7 commit 1c9ddd2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_monomorphize/src/collector.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,7 @@ impl<'v> RootCollector<'_, 'v> {
11701170
}
11711171
}
11721172
}
1173-
_ => {}
1173+
_ => bug!(),
11741174
}
11751175
}
11761176
DefKind::GlobalAsm => {
@@ -1197,8 +1197,8 @@ impl<'v> RootCollector<'_, 'v> {
11971197
}
11981198
}
11991199
DefKind::Impl => {
1200-
let item = self.tcx.hir().item(id);
12011200
if self.mode == MonoItemCollectionMode::Eager {
1201+
let item = self.tcx.hir().item(id);
12021202
create_mono_items_for_default_impls(self.tcx, item, self.output);
12031203
}
12041204
}

0 commit comments

Comments
 (0)