Add type to differentiate between fake and real DefId's
This commit is contained in:
parent
7a0f1781d0
commit
b6120bfb35
28 changed files with 336 additions and 268 deletions
|
@ -464,6 +464,8 @@ pub(super) fn write_shared(
|
|||
// Update the list of all implementors for traits
|
||||
let dst = cx.dst.join("implementors");
|
||||
for (&did, imps) in &cx.cache.implementors {
|
||||
let did = did.expect_real();
|
||||
|
||||
// Private modules can leak through to this phase of rustdoc, which
|
||||
// could contain implementations for otherwise private types. In some
|
||||
// rare cases we could find an implementation for an item which wasn't
|
||||
|
@ -496,7 +498,7 @@ pub(super) fn write_shared(
|
|||
//
|
||||
// If the implementation is from another crate then that crate
|
||||
// should add it.
|
||||
if imp.impl_item.def_id.krate == did.krate || !imp.impl_item.def_id.is_local() {
|
||||
if imp.impl_item.def_id.krate() == did.krate || !imp.impl_item.def_id.is_local() {
|
||||
None
|
||||
} else {
|
||||
Some(Implementor {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue