Skip to content

Commit

Permalink
fixes complaints about missing docs (bevyengine#4551)
Browse files Browse the repository at this point in the history
# Objective

When using `derive(WorldQuery)`, then clippy complains with the following:

```rust
warning: missing documentation for a struct
  --> src\wild_boar_type\marker_vital_status.rs:35:17
   |
35 | #[derive(Debug, WorldQuery)]
   |                 ^^^^^^^^^^
   |
   = note: this warning originates in the derive macro `WorldQuery` (in Nightly builds, run with -Z macro-backtrace for more info)
```

## Solution

* Either `#[doc(hidden)]` or
* Add a generic documentation line to it.

I don't know what is preferred, but I'd gladly add it in here.
  • Loading branch information
CGMossa authored and exjam committed May 22, 2022
1 parent b5ac167 commit 95cc262
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/bevy_ecs/macros/src/fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ pub fn derive_world_query_impl(ast: DeriveInput) -> TokenStream {
} else {
quote! {
#derive_macro_call
#[automatically_derived]
#visibility struct #item_struct_name #impl_generics #where_clause {
#(#(#field_attrs)* #field_visibilities #field_idents: <<#field_types as #path::query::WorldQuery>::#fetch_associated_type as #path::query::Fetch<#world_lifetime, #world_lifetime>>::Item,)*
#(#(#ignored_field_attrs)* #ignored_field_visibilities #ignored_field_idents: #ignored_field_types,)*
Expand Down

0 comments on commit 95cc262

Please sign in to comment.