diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2021-04-25 01:53:13 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-25 01:53:13 +0900 |
| commit | 46c517b7c43e332ef0a9bf9ff2ad6bd00eaefc80 (patch) | |
| tree | d470cfb30da8f36ca34c02bed67a2abe43892cc9 | |
| parent | 277b88be30a1f3af15212362e6bd8fe229eaa1f5 (diff) | |
| parent | 03ace761fbe0735bc5b76fbe94e4ef4478cbfcde (diff) | |
| download | rust-46c517b7c43e332ef0a9bf9ff2ad6bd00eaefc80.tar.gz rust-46c517b7c43e332ef0a9bf9ff2ad6bd00eaefc80.zip | |
Rollup merge of #84459 - jyn514:json-mod, r=aDotInTheVoid
rustdoc: Turn `JsonRenderer::mod_item_in` into `unreachable!()` The JSON renderer no longer gets called on modules (since https://github.com/rust-lang/rust/pull/83055). r? ``@aDotInTheVoid``
| -rw-r--r-- | src/librustdoc/json/mod.rs | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/librustdoc/json/mod.rs b/src/librustdoc/json/mod.rs index b048e7f919f..96ea4b6c3b8 100644 --- a/src/librustdoc/json/mod.rs +++ b/src/librustdoc/json/mod.rs @@ -181,21 +181,8 @@ impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx> { Ok(()) } - fn mod_item_in(&mut self, item: &clean::Item) -> Result<(), Error> { - use clean::types::ItemKind::*; - if let ModuleItem(m) = &*item.kind { - for item in &m.items { - match &*item.kind { - // These don't have names so they don't get added to the output by default - ImportItem(_) => self.item(item.clone()).unwrap(), - ExternCrateItem { .. } => self.item(item.clone()).unwrap(), - ImplItem(i) => i.items.iter().for_each(|i| self.item(i.clone()).unwrap()), - _ => {} - } - } - } - self.item(item.clone()).unwrap(); - Ok(()) + fn mod_item_in(&mut self, _item: &clean::Item) -> Result<(), Error> { + unreachable!("RUN_ON_MODULE = false should never call mod_item_in") } fn after_krate(&mut self) -> Result<(), Error> { |
