Skip to content

Commit f1414cb

Browse files
authored
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. ![image](https://github.com/user-attachments/assets/b4665861-c405-467f-b30b-82b4b1d99bf7) (This got missed originally because #14050 and #14703 were open at the same time.)
1 parent a464004 commit f1414cb

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

crates/bevy_ecs/src/system/builder.rs

+10-2
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ unsafe impl<
194194
}
195195

196196
macro_rules! impl_system_param_builder_tuple {
197-
($(($param: ident, $builder: ident)),*) => {
197+
($(#[$meta:meta])* $(($param: ident, $builder: ident)),*) => {
198+
$(#[$meta])*
198199
// SAFETY: implementors of each `SystemParamBuilder` in the tuple have validated their impls
199200
unsafe impl<$($param: SystemParam,)* $($builder: SystemParamBuilder<$param>,)*> SystemParamBuilder<($($param,)*)> for ($($builder,)*) {
200201
fn build(self, _world: &mut World, _meta: &mut SystemMeta) -> <($($param,)*) as SystemParam>::State {
@@ -207,7 +208,14 @@ macro_rules! impl_system_param_builder_tuple {
207208
};
208209
}
209210

210-
all_tuples!(impl_system_param_builder_tuple, 0, 16, P, B);
211+
all_tuples!(
212+
#[doc(fake_variadic)]
213+
impl_system_param_builder_tuple,
214+
0,
215+
16,
216+
P,
217+
B
218+
);
211219

212220
// SAFETY: implementors of each `SystemParamBuilder` in the vec have validated their impls
213221
unsafe impl<P: SystemParam, B: SystemParamBuilder<P>> SystemParamBuilder<Vec<P>> for Vec<B> {

0 commit comments

Comments
 (0)