Skip to content

Commit 0d971a6

Browse files
LoopyAshylupan
andauthored
Added documentation to the fields within derived read-only types (#8334)
Fixes #8333 # Objective Fixes issue which causes failure to compile if using `#![deny(missing_docs)]`. ## Solution Added some very basic commenting to the generated read-only fields. honestly I feel this to be up for debate since the comments are very basic and give very little useful information but the purpose of this PR is to fix the issue at hand. --- ## Changelog Added comments to the derive macro and the projects now successfully compile. --------- Co-authored-by: lupan <[email protected]>
1 parent e931225 commit 0d971a6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

crates/bevy_ecs/macros/src/fetch.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,12 @@ pub fn derive_world_query_impl(input: TokenStream) -> TokenStream {
365365
#[doc = "`]."]
366366
#[automatically_derived]
367367
#visibility struct #read_only_struct_name #user_impl_generics #user_where_clauses {
368-
#( #field_visibilities #named_field_idents: #read_only_field_types, )*
368+
#(
369+
#[doc = "Automatically generated read-only field for accessing `"]
370+
#[doc = stringify!(#field_types)]
371+
#[doc = "`."]
372+
#field_visibilities #named_field_idents: #read_only_field_types,
373+
)*
369374
}
370375

371376
#readonly_state

0 commit comments

Comments
 (0)