diff options
| author | Michael Howell <michael@notriddle.com> | 2022-06-08 19:26:51 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2022-06-08 19:26:51 -0700 |
| commit | 6950f144cf83d10bc4a304b48488f9f5368cfaae (patch) | |
| tree | cdb01e93a5aa5912f6ef07deef7ba8c622027f67 /library/core/src/tuple.rs | |
| parent | 7a935670055d87e17c381542f4eaab481e8bf17b (diff) | |
| download | rust-6950f144cf83d10bc4a304b48488f9f5368cfaae.tar.gz rust-6950f144cf83d10bc4a304b48488f9f5368cfaae.zip | |
rustdoc: show tuple impls as `impl Trait for (T, ...)`
This commit adds a new unstable attribute, `#[doc(tuple_varadic)]`, that shows a 1-tuple as `(T, ...)` instead of just `(T,)`, and links to a section in the tuple primitive docs that talks about these.
Diffstat (limited to 'library/core/src/tuple.rs')
| -rw-r--r-- | library/core/src/tuple.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/library/core/src/tuple.rs b/library/core/src/tuple.rs index 61fa0eea78a..9ddefc651ba 100644 --- a/library/core/src/tuple.rs +++ b/library/core/src/tuple.rs @@ -105,6 +105,7 @@ macro_rules! tuple_impls { macro_rules! maybe_tuple_doc { ($a:ident @ #[$meta:meta] $item:item) => { + #[cfg_attr(not(bootstrap), doc(tuple_varadic))] #[doc = "This trait is implemented for tuples up to twelve items long."] #[$meta] $item |
