docs: show Clone and Copy on () doc pages
This commit is contained in:
parent
1e6a85789e
commit
7a93567005
4 changed files with 68 additions and 2 deletions
|
@ -444,6 +444,22 @@ mod prim_unit {}
|
|||
#[doc(hidden)]
|
||||
impl () {}
|
||||
|
||||
// Fake impl that's only really used for docs.
|
||||
#[cfg(doc)]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl Clone for () {
|
||||
fn clone(&self) -> Self {
|
||||
loop {}
|
||||
}
|
||||
}
|
||||
|
||||
// Fake impl that's only really used for docs.
|
||||
#[cfg(doc)]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl Copy for () {
|
||||
// empty
|
||||
}
|
||||
|
||||
#[doc(primitive = "pointer")]
|
||||
#[doc(alias = "ptr")]
|
||||
#[doc(alias = "*")]
|
||||
|
@ -959,6 +975,24 @@ mod prim_tuple {}
|
|||
#[doc(hidden)]
|
||||
impl<T, U> (T, U) {}
|
||||
|
||||
// Fake impl that's only really used for docs.
|
||||
#[cfg(doc)]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
/// This trait is implemented on arbitrary-length tuples.
|
||||
impl<T: Clone> Clone for (T,) {
|
||||
fn clone(&self) -> Self {
|
||||
loop {}
|
||||
}
|
||||
}
|
||||
|
||||
// Fake impl that's only really used for docs.
|
||||
#[cfg(doc)]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
/// This trait is implemented on arbitrary-length tuples.
|
||||
impl<T: Copy> Copy for (T,) {
|
||||
// empty
|
||||
}
|
||||
|
||||
#[doc(primitive = "f32")]
|
||||
/// A 32-bit floating point type (specifically, the "binary32" type defined in IEEE 754-2008).
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue