rustdoc: Fix json output and input
Turns out a hash map with integer keys isn't serializable to json. Closes #10115
This commit is contained in:
parent
6db37bb147
commit
68d576fd34
5 changed files with 34 additions and 6 deletions
4
src/test/run-make/rustdoc-json/Makefile
Normal file
4
src/test/run-make/rustdoc-json/Makefile
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
-include ../tools.mk
|
||||
all:
|
||||
$(RUSTDOC) -w json -o $(TMPDIR)/doc.json foo.rs
|
||||
$(RUSTDOC) -o $(TMPDIR)/doc $(TMPDIR)/doc.json
|
||||
25
src/test/run-make/rustdoc-json/foo.rs
Normal file
25
src/test/run-make/rustdoc-json/foo.rs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#[crate_id = "foo#0.1"];
|
||||
|
||||
//! Very docs
|
||||
|
||||
pub mod bar {
|
||||
|
||||
/// So correct
|
||||
pub mod baz {
|
||||
/// Much detail
|
||||
pub fn baz() { }
|
||||
}
|
||||
|
||||
/// *wow*
|
||||
pub trait Doge { }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue