File tree 2 files changed +26
-1
lines changed
2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -310,8 +310,31 @@ impl StableInterpolate for Dir3A {
310
310
}
311
311
}
312
312
313
+ // If you're confused about how #[doc(fake_variadic)] works,
314
+ // then the `all_tuples` macro is nicely documented (it can be found in the `bevy_utils` crate).
315
+ // tl;dr: `#[doc(fake_variadic)]` goes on the impl of tuple length one.
316
+ // the others have to be hidden using `#[doc(hidden)]`.
313
317
macro_rules! impl_stable_interpolate_tuple {
318
+ ( ( $T: ident, $n: tt) ) => {
319
+ impl_stable_interpolate_tuple! {
320
+ @impl
321
+ #[ cfg_attr( any( docsrs, docsrs_dep) , doc( fake_variadic) ) ]
322
+ #[ cfg_attr(
323
+ any( docsrs, docsrs_dep) ,
324
+ doc = "This trait is implemented for tuples up to 11 items long."
325
+ ) ]
326
+ ( $T, $n)
327
+ }
328
+ } ;
314
329
( $( ( $T: ident, $n: tt) ) ,* ) => {
330
+ impl_stable_interpolate_tuple! {
331
+ @impl
332
+ #[ cfg_attr( any( docsrs, docsrs_dep) , doc( hidden) ) ]
333
+ $( ( $T, $n) ) ,*
334
+ }
335
+ } ;
336
+ ( @impl $( #[ $( $meta: meta) * ] ) * $( ( $T: ident, $n: tt) ) ,* ) => {
337
+ $( #[ $( $meta) * ] ) *
315
338
impl <$( $T: StableInterpolate ) ,* > StableInterpolate for ( $( $T, ) * ) {
316
339
fn interpolate_stable( & self , other: & Self , t: f32 ) -> Self {
317
340
(
Original file line number Diff line number Diff line change 1
- #![ cfg_attr( docsrs, feature( doc_auto_cfg) ) ]
2
1
#![ forbid( unsafe_code) ]
2
+ #![ allow( internal_features) ]
3
+ #![ cfg_attr( any( docsrs, docsrs_dep) , feature( rustdoc_internals) ) ]
4
+ #![ cfg_attr( docsrs, feature( doc_auto_cfg) ) ]
3
5
#![ doc(
4
6
html_logo_url = "https://bevyengine.org/assets/icon.png" ,
5
7
html_favicon_url = "https://bevyengine.org/assets/icon.png"
You can’t perform that action at this time.
0 commit comments