mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 02:00:00 +03:00
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:
@@ -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 @@ pub(crate) fn simplified_types() -> &'static SimplifiedTypes {
|
||||
//
|
||||
// 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(),
|
||||
|
||||
Reference in New Issue
Block a user