Skip to content

Commit

Permalink
remove a doc(hidden) on read only version of derive(WorldQuery) (b…
Browse files Browse the repository at this point in the history
…evyengine#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.
  • Loading branch information
BoxyUwU authored and alradish committed Jan 22, 2023
1 parent 0a18c52 commit 2f09508
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crates/bevy_ecs/macros/src/fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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, )*
Expand Down

0 comments on commit 2f09508

Please sign in to comment.