forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#74955 - P1n3appl3:rustdoc-formats, r=Guillaum…
…eGomez Add `--output-format json` for Rustdoc on nightly This enables the previously deprecated `--output-format` flag so it can be used on nightly to host the experimental implementation of [rfc/2963](rust-lang/rfcs#2963). The actual implementation will come in later PRs so for now there's just a stub that gives you an ICE. I'm _pretty_ sure that the logic I added makes it inaccessible from stable, but someone should double check that. @tmandry @jyn514
- Loading branch information
Showing
3 changed files
with
81 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
use crate::clean; | ||
use crate::config::{RenderInfo, RenderOptions}; | ||
use crate::error::Error; | ||
use crate::formats::cache::Cache; | ||
use crate::formats::FormatRenderer; | ||
|
||
use rustc_span::edition::Edition; | ||
|
||
#[derive(Clone)] | ||
pub struct JsonRenderer {} | ||
|
||
impl FormatRenderer for JsonRenderer { | ||
fn init( | ||
_krate: clean::Crate, | ||
_options: RenderOptions, | ||
_render_info: RenderInfo, | ||
_edition: Edition, | ||
_cache: &mut Cache, | ||
) -> Result<(Self, clean::Crate), Error> { | ||
unimplemented!() | ||
} | ||
|
||
fn item(&mut self, _item: clean::Item, _cache: &Cache) -> Result<(), Error> { | ||
unimplemented!() | ||
} | ||
|
||
fn mod_item_in( | ||
&mut self, | ||
_item: &clean::Item, | ||
_item_name: &str, | ||
_cache: &Cache, | ||
) -> Result<(), Error> { | ||
unimplemented!() | ||
} | ||
|
||
fn mod_item_out(&mut self, _item_name: &str) -> Result<(), Error> { | ||
unimplemented!() | ||
} | ||
|
||
fn after_krate(&mut self, _krate: &clean::Crate, _cache: &Cache) -> Result<(), Error> { | ||
unimplemented!() | ||
} | ||
|
||
fn after_run(&mut self, _diag: &rustc_errors::Handler) -> Result<(), Error> { | ||
unimplemented!() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters