@@ -122,23 +122,29 @@ macro_rules! tuple_impls {
122
122
}
123
123
}
124
124
125
- #[ stable( feature = "array_tuple_conv" , since = "1.71.0" ) ]
126
- impl <T > From <[ T ; ${ count( $T) } ] > for ( $( ${ ignore( $T) } T , ) +) {
127
- #[ inline]
128
- #[ allow( non_snake_case) ]
129
- fn from( array: [ T ; ${ count( $T) } ] ) -> Self {
130
- let [ $( $T, ) +] = array;
131
- ( $( $T, ) +)
125
+ maybe_tuple_doc! {
126
+ $( $T) + @
127
+ #[ stable( feature = "array_tuple_conv" , since = "1.71.0" ) ]
128
+ impl <T > From <[ T ; ${ count( $T) } ] > for ( $( ${ ignore( $T) } T , ) +) {
129
+ #[ inline]
130
+ #[ allow( non_snake_case) ]
131
+ fn from( array: [ T ; ${ count( $T) } ] ) -> Self {
132
+ let [ $( $T, ) +] = array;
133
+ ( $( $T, ) +)
134
+ }
132
135
}
133
136
}
134
137
135
- #[ stable( feature = "array_tuple_conv" , since = "1.71.0" ) ]
136
- impl <T > From <( $( ${ ignore( $T) } T , ) +) > for [ T ; ${ count( $T) } ] {
137
- #[ inline]
138
- #[ allow( non_snake_case) ]
139
- fn from( tuple: ( $( ${ ignore( $T) } T , ) +) ) -> Self {
140
- let ( $( $T, ) +) = tuple;
141
- [ $( $T, ) +]
138
+ maybe_tuple_doc! {
139
+ $( $T) + @
140
+ #[ stable( feature = "array_tuple_conv" , since = "1.71.0" ) ]
141
+ impl <T > From <( $( ${ ignore( $T) } T , ) +) > for [ T ; ${ count( $T) } ] {
142
+ #[ inline]
143
+ #[ allow( non_snake_case) ]
144
+ fn from( tuple: ( $( ${ ignore( $T) } T , ) +) ) -> Self {
145
+ let ( $( $T, ) +) = tuple;
146
+ [ $( $T, ) +]
147
+ }
142
148
}
143
149
}
144
150
}
@@ -148,7 +154,7 @@ macro_rules! tuple_impls {
148
154
// Otherwise, it hides the docs entirely.
149
155
macro_rules! maybe_tuple_doc {
150
156
( $a: ident @ #[ $meta: meta] $item: item) => {
151
- #[ doc( fake_variadic) ]
157
+ #[ cfg_attr ( not ( bootstrap ) , doc( fake_variadic) ) ]
152
158
#[ doc = "This trait is implemented for tuples up to twelve items long." ]
153
159
#[ $meta]
154
160
$item
0 commit comments