Don't push the crate name onto the Cache.stack

Now that we record the crate's name in its `clean::Item`, pushing the
crate name onto the `stack` causes duplicate paths. E.g., the URL
generated for the path `::foo::bar::baz` would be something like

    ../foo/foo/bar/baz

With this commit, the URL is corrected to

    ../foo/bar/baz
This commit is contained in:
Camelid 2021-03-22 21:18:06 -07:00
parent 72a180e134
commit c9ae35978c

View File

@ -182,8 +182,6 @@ impl Cache {
self.primitive_locations.insert(prim, def_id);
}
self.stack.push(krate.name.to_string());
krate = CacheBuilder { tcx, cache: self, empty_cache: Cache::default() }.fold_crate(krate);
for (trait_did, dids, impl_) in self.orphan_trait_impls.drain(..) {