Convert DefId to use DefIndex, which is an index into a list of
paths, and construct paths for all definitions. Also, stop rewriting DefIds for closures, and instead just load the closure data from the original def-id, which may be in another crate.
This commit is contained in:
@@ -19,9 +19,8 @@ use std::fmt;
|
||||
use std::iter::repeat;
|
||||
|
||||
use rustc::metadata::cstore::LOCAL_CRATE;
|
||||
use rustc::middle::def_id::DefId;
|
||||
use rustc::middle::def_id::{CRATE_DEF_INDEX, DefId};
|
||||
use syntax::abi::Abi;
|
||||
use syntax::ast;
|
||||
use rustc_front::hir;
|
||||
|
||||
use clean;
|
||||
@@ -387,7 +386,7 @@ fn primitive_link(f: &mut fmt::Formatter,
|
||||
Some(&cnum) => {
|
||||
let path = &m.paths[&DefId {
|
||||
krate: cnum,
|
||||
xxx_node: ast::CRATE_NODE_ID,
|
||||
index: CRATE_DEF_INDEX,
|
||||
}];
|
||||
let loc = match m.extern_locations[&cnum] {
|
||||
(_, render::Remote(ref s)) => Some(s.to_string()),
|
||||
|
||||
Reference in New Issue
Block a user