diff options
| author | Michael Howell <michael@notriddle.com> | 2022-06-08 19:51:54 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2022-06-08 19:51:54 -0700 |
| commit | 85b0c2ffbb2c047c744ad10f7e72d87cbf4dbd32 (patch) | |
| tree | 0f221a42c9eb8205e827bba43d077f8d451a35ba /src | |
| parent | 6950f144cf83d10bc4a304b48488f9f5368cfaae (diff) | |
| download | rust-85b0c2ffbb2c047c744ad10f7e72d87cbf4dbd32.tar.gz rust-85b0c2ffbb2c047c744ad10f7e72d87cbf4dbd32.zip | |
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,
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/clean/types.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs index 95c84e68b83..f77884370f5 100644 --- a/src/librustdoc/clean/types.rs +++ b/src/librustdoc/clean/types.rs @@ -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(), |
