Use #[doc(fake_variadic)]
for SystemParamBuilder
tuple impls. (#14962)
# Objective Make the documentation for `SystemParamBuilder` nicer by combining the tuple implementations into a single line of documentation. ## Solution Use `#[doc(fake_variadic)]` for `SystemParamBuilder` tuple impls.  (This got missed originally because #14050 and #14703 were open at the same time.)
This commit is contained in:
parent
a4640046fc
commit
f1414cba23
@ -194,7 +194,8 @@ unsafe impl<
|
|||||||
}
|
}
|
||||||
|
|
||||||
macro_rules! impl_system_param_builder_tuple {
|
macro_rules! impl_system_param_builder_tuple {
|
||||||
($(($param: ident, $builder: ident)),*) => {
|
($(#[$meta:meta])* $(($param: ident, $builder: ident)),*) => {
|
||||||
|
$(#[$meta])*
|
||||||
// SAFETY: implementors of each `SystemParamBuilder` in the tuple have validated their impls
|
// SAFETY: implementors of each `SystemParamBuilder` in the tuple have validated their impls
|
||||||
unsafe impl<$($param: SystemParam,)* $($builder: SystemParamBuilder<$param>,)*> SystemParamBuilder<($($param,)*)> for ($($builder,)*) {
|
unsafe impl<$($param: SystemParam,)* $($builder: SystemParamBuilder<$param>,)*> SystemParamBuilder<($($param,)*)> for ($($builder,)*) {
|
||||||
fn build(self, _world: &mut World, _meta: &mut SystemMeta) -> <($($param,)*) as SystemParam>::State {
|
fn build(self, _world: &mut World, _meta: &mut SystemMeta) -> <($($param,)*) as SystemParam>::State {
|
||||||
@ -207,7 +208,14 @@ macro_rules! impl_system_param_builder_tuple {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
all_tuples!(impl_system_param_builder_tuple, 0, 16, P, B);
|
all_tuples!(
|
||||||
|
#[doc(fake_variadic)]
|
||||||
|
impl_system_param_builder_tuple,
|
||||||
|
0,
|
||||||
|
16,
|
||||||
|
P,
|
||||||
|
B
|
||||||
|
);
|
||||||
|
|
||||||
// SAFETY: implementors of each `SystemParamBuilder` in the vec have validated their impls
|
// SAFETY: implementors of each `SystemParamBuilder` in the vec have validated their impls
|
||||||
unsafe impl<P: SystemParam, B: SystemParamBuilder<P>> SystemParamBuilder<Vec<P>> for Vec<B> {
|
unsafe impl<P: SystemParam, B: SystemParamBuilder<P>> SystemParamBuilder<Vec<P>> for Vec<B> {
|
||||||
|
Loading…
Reference in New Issue
Block a user