Replace ToJson with serde

This commit is contained in:
Guillaume Gomez 2020-02-17 13:53:27 +01:00
parent 15babed8b7
commit f1070b1525
8 changed files with 52 additions and 79 deletions

View file

@ -0,0 +1,4 @@
// compile-flags:-Z unstable-options --output-format html --show-coverage
/// Foo
pub struct Xo;

View file

@ -0,0 +1,2 @@
error: html output format isn't supported for the --show-coverage option

View file

@ -1,5 +1,5 @@
// build-pass
// compile-flags:-Z unstable-options --show-coverage
// compile-flags:-Z unstable-options --output-format json --show-coverage
pub mod foo {
/// Hello!

View file

@ -1,7 +1 @@
+-------------------------------------+------------+------------+------------+
| File | Documented | Total | Percentage |
+-------------------------------------+------------+------------+------------+
| ...test/rustdoc-ui/coverage/json.rs | 7 | 13 | 53.8% |
+-------------------------------------+------------+------------+------------+
| Total | 7 | 13 | 53.8% |
+-------------------------------------+------------+------------+------------+
{"$DIR/json.rs":{"total":13,"with_docs":7}}

View file

@ -1,5 +1,4 @@
// compile-flags:-Z unstable-options --output-format
// should-fail
/// toudoum!
pub struct SomeStruct;

View file

@ -0,0 +1,6 @@
warning: the 'output-format' flag is considered deprecated
|
= warning: see issue #44136 <https://github.com/rust-lang/rust/issues/44136> for more information
error: too many file operands