Skip to content

Commit db2c3ba

Browse files
committed
rollup merge of #23674: nagisa/fallout-1
2 parents efaef24 + 492f07b commit db2c3ba

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/librustdoc/html/format.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ fn resolved_path(w: &mut fmt::Formatter, did: ast::DefId, p: &clean::Path,
290290
if ast_util::is_local(did) || cache.inlined.contains(&did) {
291291
Some(repeat("../").take(loc.len()).collect::<String>())
292292
} else {
293-
match cache.extern_locations[&did.krate] {
293+
match cache.extern_locations[did.krate] {
294294
render::Remote(ref s) => Some(s.to_string()),
295295
render::Local => {
296296
Some(repeat("../").take(loc.len()).collect::<String>())
@@ -404,11 +404,11 @@ fn primitive_link(f: &mut fmt::Formatter,
404404
needs_termination = true;
405405
}
406406
Some(&cnum) => {
407-
let path = &m.paths[&ast::DefId {
407+
let path = &m.paths[ast::DefId {
408408
krate: cnum,
409409
node: ast::CRATE_NODE_ID,
410410
}];
411-
let loc = match m.extern_locations[&cnum] {
411+
let loc = match m.extern_locations[cnum] {
412412
render::Remote(ref s) => Some(s.to_string()),
413413
render::Local => {
414414
let len = CURRENT_LOCATION_KEY.with(|s| s.borrow().len());

src/librustdoc/html/render.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1409,8 +1409,8 @@ impl<'a> Item<'a> {
14091409
// located, then we return `None`.
14101410
} else {
14111411
let cache = cache();
1412-
let path = &cache.external_paths[&self.item.def_id];
1413-
let root = match cache.extern_locations[&self.item.def_id.krate] {
1412+
let path = &cache.external_paths[self.item.def_id];
1413+
let root = match cache.extern_locations[self.item.def_id.krate] {
14141414
Remote(ref s) => s.to_string(),
14151415
Local => self.cx.root_path.clone(),
14161416
Unknown => return None,
@@ -1868,7 +1868,7 @@ fn item_trait(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,
18681868
path = if ast_util::is_local(it.def_id) {
18691869
cx.current.connect("/")
18701870
} else {
1871-
let path = &cache.external_paths[&it.def_id];
1871+
let path = &cache.external_paths[it.def_id];
18721872
path[..path.len() - 1].connect("/")
18731873
},
18741874
ty = shortty(it).to_static_str(),

src/librustdoc/visit_ast.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
196196
Some(tcx) => tcx,
197197
None => return false
198198
};
199-
let def = tcx.def_map.borrow()[&id].def_id();
199+
let def = tcx.def_map.borrow()[id].def_id();
200200
if !ast_util::is_local(def) { return false }
201201
let analysis = match self.analysis {
202202
Some(analysis) => analysis, None => return false

0 commit comments

Comments
 (0)