From 476d79d8215a96c43356b8965d769929fce71fb8 Mon Sep 17 00:00:00 2001 From: theotherphil Date: Wed, 4 Jun 2025 21:43:47 +0100 Subject: [PATCH] deny(missing_docs) for bevy_state (#19492) # Objective Deny missing docs in bevy_state, towards https://github.com/bevyengine/bevy/issues/3492. --- crates/bevy_state/macros/src/lib.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/bevy_state/macros/src/lib.rs b/crates/bevy_state/macros/src/lib.rs index f461f0ead2..3c5a2d0674 100644 --- a/crates/bevy_state/macros/src/lib.rs +++ b/crates/bevy_state/macros/src/lib.rs @@ -1,6 +1,7 @@ -#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")] #![cfg_attr(docsrs, feature(doc_auto_cfg))] +//! Macros for deriving `States` and `SubStates` traits. + extern crate proc_macro; mod states; @@ -8,11 +9,15 @@ mod states; use bevy_macro_utils::BevyManifest; use proc_macro::TokenStream; +/// Implements the `States` trait for a type - see the trait +/// docs for an example usage. #[proc_macro_derive(States, attributes(states))] pub fn derive_states(input: TokenStream) -> TokenStream { states::derive_states(input) } +/// Implements the `SubStates` trait for a type - see the trait +/// docs for an example usage. #[proc_macro_derive(SubStates, attributes(states, source))] pub fn derive_substates(input: TokenStream) -> TokenStream { states::derive_substates(input)