Skip to content

Commit

Permalink
change doc phrasing
Browse files Browse the repository at this point in the history
  • Loading branch information
mj10021 committed Feb 11, 2024
1 parent 37e1298 commit ed59fd9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1,617 deletions.
16 changes: 8 additions & 8 deletions library/core/src/primitive_docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1671,11 +1671,16 @@ mod prim_ref {}
#[stable(feature = "rust1", since = "1.0.0")]
mod prim_fn {}

// Required to make auto trait impls render.
// See src/librustdoc/passes/collect_trait_impls.rs:collect_trait_impls
#[doc(hidden)]
impl<Ret, T> fn(T) -> Ret {}

// Fake impl that's only really used for docs.
#[cfg(doc)]
#[stable(feature = "rust1", since = "1.0.0")]
#[doc(fake_variadic)]
/// This trait is implemented on function pointers with any number of arguments.
/// This trait is implemented on all function pointers.
impl<Ret, T> Clone for fn(T) -> Ret {
fn clone(&self) -> Self {
loop {}
Expand All @@ -1686,7 +1691,7 @@ impl<Ret, T> Clone for fn(T) -> Ret {
#[cfg(doc)]
#[stable(feature = "rust1", since = "1.0.0")]
#[doc(fake_variadic)]
/// This trait is implemented on function pointers with any number of arguments.
/// This trait is implemented on all function pointers.
impl<Ret, T> Copy for fn(T) -> Ret {
// empty
}
Expand All @@ -1699,14 +1704,9 @@ impl<Ret, T> Copy for fn(T) -> Ret {
reason = "internal trait for implementing various traits for all function pointers"
)]
#[doc(fake_variadic)]
/// This trait is implemented on function pointers with any number of arguments.
/// This trait is implemented on all function pointers.
impl<Ret, T> FnPtr for fn(T) -> Ret {
fn addr(self) -> *const () {
// empty
}
}

// Required to make auto trait impls render.
// See src/librustdoc/passes/collect_trait_impls.rs:collect_trait_impls
#[doc(hidden)]
impl<Ret, T> fn(T) -> Ret {}
Loading

0 comments on commit ed59fd9

Please sign in to comment.