rustdoc: extend #[doc(tuple_variadic)] to fn pointers

The attribute is also renamed `fake_variadic`.
This commit is contained in:
Michael Howell 2022-06-16 09:50:57 -07:00
parent 263edd43c5
commit 1169832f2f
21 changed files with 61 additions and 42 deletions

View file

@ -996,7 +996,7 @@ impl<T> (T,) {}
// Fake impl that's only really used for docs.
#[cfg(doc)]
#[stable(feature = "rust1", since = "1.0.0")]
#[doc(tuple_variadic)]
#[cfg_attr(not(bootstrap), doc(fake_variadic))]
/// This trait is implemented on arbitrary-length tuples.
impl<T: Clone> Clone for (T,) {
fn clone(&self) -> Self {
@ -1007,7 +1007,7 @@ impl<T: Clone> Clone for (T,) {
// Fake impl that's only really used for docs.
#[cfg(doc)]
#[stable(feature = "rust1", since = "1.0.0")]
#[doc(tuple_variadic)]
#[cfg_attr(not(bootstrap), doc(fake_variadic))]
/// This trait is implemented on arbitrary-length tuples.
impl<T: Copy> Copy for (T,) {
// empty