Skip to content

Commit f6bfba7

Browse files
committed
---
yaml --- r: 103111 b: refs/heads/auto c: 68d576f h: refs/heads/master i: 103109: 770d4a0 103107: 25b5716 103103: adca8e7 v: v3
1 parent 3c17056 commit f6bfba7

File tree

6 files changed

+35
-7
lines changed

6 files changed

+35
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 6db37bb147c06cddf7ae6a99eb913a5ceaee792b
16+
refs/heads/auto: 68d576fd345b197e5be08cc9b84201e5897dc729
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/librustdoc/clean.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ use rustc::metadata::csearch;
2525
use rustc::metadata::decoder;
2626

2727
use std;
28-
use std::hashmap::HashMap;
2928

3029
use doctree;
3130
use visit_ast;
@@ -68,17 +67,17 @@ impl<T: Clean<U>, U> Clean<~[U]> for syntax::opt_vec::OptVec<T> {
6867
pub struct Crate {
6968
name: ~str,
7069
module: Option<Item>,
71-
externs: HashMap<ast::CrateNum, ExternalCrate>,
70+
externs: ~[(ast::CrateNum, ExternalCrate)],
7271
}
7372

7473
impl<'a> Clean<Crate> for visit_ast::RustdocVisitor<'a> {
7574
fn clean(&self) -> Crate {
7675
use syntax::attr::find_crateid;
7776
let cx = local_data::get(super::ctxtkey, |x| *x.unwrap());
7877

79-
let mut externs = HashMap::new();
78+
let mut externs = ~[];
8079
cx.sess.cstore.iter_crate_data(|n, meta| {
81-
externs.insert(n, meta.clean());
80+
externs.push((n, meta.clean()));
8281
});
8382

8483
Crate {

branches/auto/src/librustdoc/html/render.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ pub fn run(mut krate: clean::Crate, dst: Path) -> io::IoResult<()> {
305305
krate = folder.fold_crate(krate);
306306
}
307307

308-
for (&n, e) in krate.externs.iter() {
308+
for &(n, ref e) in krate.externs.iter() {
309309
cache.extern_locations.insert(n, extern_location(e, &cx.dst));
310310
}
311311

branches/auto/src/librustdoc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ fn json_output(krate: clean::Crate, res: ~[plugins::PluginJson],
344344
};
345345
let crate_json = match json::from_str(crate_json_str) {
346346
Ok(j) => j,
347-
Err(_) => fail!("Rust generated JSON is invalid??")
347+
Err(e) => fail!("Rust generated JSON is invalid: {:?}", e)
348348
};
349349

350350
json.insert(~"crate", crate_json);
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-include ../tools.mk
2+
all:
3+
$(RUSTDOC) -w json -o $(TMPDIR)/doc.json foo.rs
4+
$(RUSTDOC) -o $(TMPDIR)/doc $(TMPDIR)/doc.json
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
#[crate_id = "foo#0.1"];
12+
13+
//! Very docs
14+
15+
pub mod bar {
16+
17+
/// So correct
18+
pub mod baz {
19+
/// Much detail
20+
pub fn baz() { }
21+
}
22+
23+
/// *wow*
24+
pub trait Doge { }
25+
}

0 commit comments

Comments
 (0)