Hide Derived SystemParam State Struct From Docs (#1984)

This makes sure the automatically generated MyStructState type is not
shown in the rustdoc when deriving SystemParam on MyStruct.
This commit is contained in:
Zicklag 2021-04-22 23:09:59 +00:00
parent 391ccd0ad0
commit 6508b4ed25

View file

@ -380,6 +380,7 @@ pub fn derive_system_param(input: TokenStream) -> TokenStream {
type Fetch = #fetch_struct_name <(#(<#field_types as SystemParam>::Fetch,)*), #punctuated_generic_idents>;
}
#[doc(hidden)]
#fetch_struct_visibility struct #fetch_struct_name<TSystemParamState, #punctuated_generic_idents> {
state: TSystemParamState,
marker: std::marker::PhantomData<(#punctuated_generic_idents)>