rustdoc: fixed messed-up rustdoc auto trait impls
Before: impl<T, U> UnwindSafe for (T, ...) where T: UnwindSafe, U: UnwindSafe, After: impl<T> UnwindSafe for (T, ...) where T: UnwindSafe,
This commit is contained in:
parent
6950f144cf
commit
85b0c2ffbb
3 changed files with 6 additions and 6 deletions
|
@ -960,7 +960,7 @@ mod prim_tuple {}
|
|||
// Required to make auto trait impls render.
|
||||
// See /src/librustdoc/passes/collect_trait_impls.rs:collect_trait_impls
|
||||
#[doc(hidden)]
|
||||
impl<T, U> (T, U) {}
|
||||
impl<T> (T,) {}
|
||||
|
||||
// Fake impl that's only really used for docs.
|
||||
#[cfg(doc)]
|
||||
|
|
|
@ -960,7 +960,7 @@ mod prim_tuple {}
|
|||
// Required to make auto trait impls render.
|
||||
// See /src/librustdoc/passes/collect_trait_impls.rs:collect_trait_impls
|
||||
#[doc(hidden)]
|
||||
impl<T, U> (T, U) {}
|
||||
impl<T> (T,) {}
|
||||
|
||||
// Fake impl that's only really used for docs.
|
||||
#[cfg(doc)]
|
||||
|
|
|
@ -1750,7 +1750,7 @@ pub(crate) enum PrimitiveType {
|
|||
Never,
|
||||
}
|
||||
|
||||
type SimplifiedTypes = FxHashMap<PrimitiveType, ArrayVec<SimplifiedType, 2>>;
|
||||
type SimplifiedTypes = FxHashMap<PrimitiveType, ArrayVec<SimplifiedType, 3>>;
|
||||
impl PrimitiveType {
|
||||
pub(crate) fn from_hir(prim: hir::PrimTy) -> PrimitiveType {
|
||||
use ast::{FloatTy, IntTy, UintTy};
|
||||
|
@ -1839,10 +1839,10 @@ impl PrimitiveType {
|
|||
//
|
||||
// Either manually update this arrayvec at this point
|
||||
// or start with a more complex refactoring.
|
||||
Tuple => [TupleSimplifiedType(2), TupleSimplifiedType(3)].into(),
|
||||
Tuple => [TupleSimplifiedType(1), TupleSimplifiedType(2), TupleSimplifiedType(3)].into(),
|
||||
Unit => single(TupleSimplifiedType(0)),
|
||||
RawPointer => [PtrSimplifiedType(Mutability::Not), PtrSimplifiedType(Mutability::Mut)].into(),
|
||||
Reference => [RefSimplifiedType(Mutability::Not), RefSimplifiedType(Mutability::Mut)].into(),
|
||||
RawPointer => [PtrSimplifiedType(Mutability::Not), PtrSimplifiedType(Mutability::Mut)].into_iter().collect(),
|
||||
Reference => [RefSimplifiedType(Mutability::Not), RefSimplifiedType(Mutability::Mut)].into_iter().collect(),
|
||||
// FIXME: This will be wrong if we ever add inherent impls
|
||||
// for function pointers.
|
||||
Fn => ArrayVec::new(),
|
||||
|
|
Loading…
Add table
Reference in a new issue