rustdoc: Remove Crate.name
and instead compute it on-demand
It is not as large as `Crate.src` was, but it's still 8 bytes, and `clean::Crate` is moved by-value a lot.
This commit is contained in:
parent
85f8ae8ec4
commit
ebe9a11f71
6 changed files with 16 additions and 14 deletions
|
@ -57,7 +57,6 @@ crate fn krate(cx: &mut DocContext<'_>) -> Crate {
|
|||
}
|
||||
|
||||
let local_crate = ExternalCrate { crate_num: LOCAL_CRATE };
|
||||
let name = local_crate.name(cx.tcx);
|
||||
let primitives = local_crate.primitives(cx.tcx);
|
||||
let keywords = local_crate.keywords(cx.tcx);
|
||||
{
|
||||
|
@ -79,7 +78,6 @@ crate fn krate(cx: &mut DocContext<'_>) -> Crate {
|
|||
}
|
||||
|
||||
Crate {
|
||||
name,
|
||||
module,
|
||||
externs,
|
||||
primitives,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue