1
Fork 0

Stop re-exporting Type::ResolvedPath

I would like to rename it to `Type::Path`, but then it can't be
re-exported since the name would conflict with the `Path` struct.
Usually enum variants are referred to using their qualified names in
Rust (and parts of rustdoc already do that with `clean::Type`), so this
is also more consistent with the language.
This commit is contained in:
Noah Lev 2021-11-24 12:27:37 -08:00
parent 8adb0b6d6c
commit d81deb33fa
9 changed files with 39 additions and 36 deletions

View file

@ -1227,7 +1227,7 @@ fn should_render_item(item: &clean::Item, deref_mut_: bool, tcx: TyCtxt<'_>) ->
| SelfTy::SelfExplicit(clean::BorrowedRef { mutability, .. }) => {
(mutability == Mutability::Mut, false, false)
}
SelfTy::SelfExplicit(clean::ResolvedPath { path }) => {
SelfTy::SelfExplicit(clean::Type::ResolvedPath { path }) => {
(false, Some(path.def_id()) == tcx.lang_items().owned_box(), false)
}
SelfTy::SelfValue => (false, false, true),