Skip to content

Commit e60a7a4

Browse files
Add unreachable! in new FormatRenderer methods for JsonRenderer implementation
1 parent 5f9e716 commit e60a7a4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Diff for: src/librustdoc/json/mod.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,13 @@ impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx> {
162162
))
163163
}
164164

165-
fn make_child_renderer(&mut self) -> Self::InfoType {}
166-
fn set_back_info(&mut self, _info: Self::InfoType) {}
165+
fn make_child_renderer(&mut self) -> Self::InfoType {
166+
unreachable!("RUN_ON_MODULE = false should never call make_child_renderer")
167+
}
168+
169+
fn set_back_info(&mut self, _info: Self::InfoType) {
170+
unreachable!("RUN_ON_MODULE = false should never call set_back_info")
171+
}
167172

168173
/// Inserts an item into the index. This should be used rather than directly calling insert on
169174
/// the hashmap because certain items (traits and types) need to have their mappings for trait

0 commit comments

Comments
 (0)