Skip to content

Commit f348de9

Browse files
committed
---
yaml --- r: 104335 b: refs/heads/try c: 68d576f h: refs/heads/master i: 104333: 6e5e21c 104331: ecbdc11 104327: 0e77a66 104319: a6ddd9f v: v3
1 parent b6f03c5 commit f348de9

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
@@ -2,7 +2,7 @@
22
refs/heads/master: 62f1d68439dcfd509eaca29887afa97f22938373
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6e7f170fedd3c526a643c0b2d13863acd982be02
5-
refs/heads/try: 6db37bb147c06cddf7ae6a99eb913a5ceaee792b
5+
refs/heads/try: 68d576fd345b197e5be08cc9b84201e5897dc729
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/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/try/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/try/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)