From 2f0950838fe445a9ef293c9ae0d3e1978d6f1c12 Mon Sep 17 00:00:00 2001 From: Boxy Date: Wed, 7 Dec 2022 23:10:26 +0000 Subject: [PATCH] remove a `doc(hidden)` on read only version of `derive(WorldQuery)` (#6877) having `doc(hidden)` on the read only version of a generated mutable world query leads to docs on the readonly item having a dead link. It also makes it annoying to have nice docs for libraries attempting to expose derived `WorldQuery` structs as re-exporting the read only item does not cause it to appear in docs even though it would be intended for users to know about the read only world query and use it. --- crates/bevy_ecs/macros/src/fetch.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/bevy_ecs/macros/src/fetch.rs b/crates/bevy_ecs/macros/src/fetch.rs index a610205acc84a..f4bd82b61a7f4 100644 --- a/crates/bevy_ecs/macros/src/fetch.rs +++ b/crates/bevy_ecs/macros/src/fetch.rs @@ -333,10 +333,9 @@ pub fn derive_world_query_impl(ast: DeriveInput) -> TokenStream { let readonly_impl = if fetch_struct_attributes.is_mutable { let world_query_impl = impl_fetch(true); quote! { - #[doc(hidden)] - #[doc = "Automatically generated internal [`WorldQuery`] type for [`"] + #[doc = "Automatically generated [`WorldQuery`] type for a read-only variant of [`"] #[doc = stringify!(#struct_name)] - #[doc = "`], used for read-only access."] + #[doc = "`]."] #[automatically_derived] #visibility struct #read_only_struct_name #user_impl_generics #user_where_clauses { #( #field_idents: #read_only_field_types, )*