diff options
| author | Miguel Guarniz <mi9uel9@gmail.com> | 2022-04-09 13:52:33 -0400 |
|---|---|---|
| committer | Miguel Guarniz <mi9uel9@gmail.com> | 2022-04-09 13:52:33 -0400 |
| commit | 1c9ddd2e3e3f465af4f0ca076aed5150be0c89fa (patch) | |
| tree | b210e6b768135c2d24dec00f2544940338cacd7a | |
| parent | e2512f70ce1af23fc0b8303c5f5d6af67ecf7564 (diff) | |
| download | rust-1c9ddd2e3e3f465af4f0ca076aed5150be0c89fa.tar.gz rust-1c9ddd2e3e3f465af4f0ca076aed5150be0c89fa.zip | |
move item query inside if stmt
| -rw-r--r-- | compiler/rustc_monomorphize/src/collector.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs index bdeae1659dd..59114d1a7bb 100644 --- a/compiler/rustc_monomorphize/src/collector.rs +++ b/compiler/rustc_monomorphize/src/collector.rs @@ -1170,7 +1170,7 @@ impl<'v> RootCollector<'_, 'v> { } } } - _ => {} + _ => bug!(), } } DefKind::GlobalAsm => { @@ -1197,8 +1197,8 @@ impl<'v> RootCollector<'_, 'v> { } } DefKind::Impl => { - let item = self.tcx.hir().item(id); if self.mode == MonoItemCollectionMode::Eager { + let item = self.tcx.hir().item(id); create_mono_items_for_default_impls(self.tcx, item, self.output); } } |
