Removed usage of Attributes in FnDecl and ExternalCrate. Relocate part of the fields in Attributes, as functions in AttributesExt.
refacto use from_def_id_and_attrs_and_parts instead of an old trick most of josha suggestions + check if def_id is not fake before using it in a query Removed usage of Attributes in FnDecl and ExternalCrate. Relocate part of the Attributes fields as functions in AttributesExt.
This commit is contained in:
parent
5da10c0121
commit
b4f1dfd2c5
11 changed files with 64 additions and 53 deletions
|
@ -164,10 +164,12 @@ impl Cache {
|
|||
};
|
||||
let name = e.name(tcx);
|
||||
let extern_url = extern_html_root_urls.get(&*name.as_str()).map(|u| &**u);
|
||||
self.extern_locations
|
||||
.insert(n, (name, src_root, extern_location(e, extern_url, &dst, tcx)));
|
||||
|
||||
let did = DefId { krate: n, index: CRATE_DEF_INDEX };
|
||||
self.extern_locations.insert(
|
||||
n,
|
||||
(name, src_root, extern_location(e, extern_url, tcx.get_attrs(did), &dst, tcx)),
|
||||
);
|
||||
|
||||
self.external_paths.insert(did, (vec![name.to_string()], ItemType::Module));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue