Skip to content

Commit

Permalink
rollup merge of #23674: nagisa/fallout-1
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Mar 24, 2015
2 parents efaef24 + 492f07b commit db2c3ba
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/librustdoc/html/format.rs
Expand Up @@ -290,7 +290,7 @@ fn resolved_path(w: &mut fmt::Formatter, did: ast::DefId, p: &clean::Path,
if ast_util::is_local(did) || cache.inlined.contains(&did) {
Some(repeat("../").take(loc.len()).collect::<String>())
} else {
match cache.extern_locations[&did.krate] {
match cache.extern_locations[did.krate] {
render::Remote(ref s) => Some(s.to_string()),
render::Local => {
Some(repeat("../").take(loc.len()).collect::<String>())
Expand Down Expand Up @@ -404,11 +404,11 @@ fn primitive_link(f: &mut fmt::Formatter,
needs_termination = true;
}
Some(&cnum) => {
let path = &m.paths[&ast::DefId {
let path = &m.paths[ast::DefId {
krate: cnum,
node: ast::CRATE_NODE_ID,
}];
let loc = match m.extern_locations[&cnum] {
let loc = match m.extern_locations[cnum] {
render::Remote(ref s) => Some(s.to_string()),
render::Local => {
let len = CURRENT_LOCATION_KEY.with(|s| s.borrow().len());
Expand Down
6 changes: 3 additions & 3 deletions src/librustdoc/html/render.rs
Expand Up @@ -1409,8 +1409,8 @@ impl<'a> Item<'a> {
// located, then we return `None`.
} else {
let cache = cache();
let path = &cache.external_paths[&self.item.def_id];
let root = match cache.extern_locations[&self.item.def_id.krate] {
let path = &cache.external_paths[self.item.def_id];
let root = match cache.extern_locations[self.item.def_id.krate] {
Remote(ref s) => s.to_string(),
Local => self.cx.root_path.clone(),
Unknown => return None,
Expand Down Expand Up @@ -1868,7 +1868,7 @@ fn item_trait(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,
path = if ast_util::is_local(it.def_id) {
cx.current.connect("/")
} else {
let path = &cache.external_paths[&it.def_id];
let path = &cache.external_paths[it.def_id];
path[..path.len() - 1].connect("/")
},
ty = shortty(it).to_static_str(),
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/visit_ast.rs
Expand Up @@ -196,7 +196,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
Some(tcx) => tcx,
None => return false
};
let def = tcx.def_map.borrow()[&id].def_id();
let def = tcx.def_map.borrow()[id].def_id();
if !ast_util::is_local(def) { return false }
let analysis = match self.analysis {
Some(analysis) => analysis, None => return false
Expand Down

0 comments on commit db2c3ba

Please sign in to comment.