Rollup merge of #96565 - notriddle:notriddle/impl-box, r=camelid
rustdoc: show implementations on `#[fundamental]` wrappers Fixes #92940
This commit is contained in:
commit
afcf099e30
2 changed files with 26 additions and 1 deletions
|
@ -3,7 +3,7 @@ use std::mem;
|
|||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
use rustc_hir::def_id::{CrateNum, DefId};
|
||||
use rustc_middle::middle::privacy::AccessLevels;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_middle::ty::{self, TyCtxt};
|
||||
use rustc_span::{sym, Symbol};
|
||||
|
||||
use crate::clean::{self, types::ExternalLocation, ExternalCrate, ItemId, PrimitiveType};
|
||||
|
@ -452,6 +452,15 @@ impl<'a, 'tcx> DocFolder for CacheBuilder<'a, 'tcx> {
|
|||
clean::Type::Path { ref path }
|
||||
| clean::BorrowedRef { type_: box clean::Type::Path { ref path }, .. } => {
|
||||
dids.insert(path.def_id());
|
||||
if let Some(generics) = path.generics() &&
|
||||
let ty::Adt(adt, _) = self.tcx.type_of(path.def_id()).kind() &&
|
||||
adt.is_fundamental() {
|
||||
for ty in generics {
|
||||
if let Some(did) = ty.def_id(&self.cache) {
|
||||
dids.insert(did);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
clean::DynTrait(ref bounds, _)
|
||||
| clean::BorrowedRef { type_: box clean::DynTrait(ref bounds, _), .. } => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue