From f2899edb07fe77731480a07b5d74f3a8c8a3df2a Mon Sep 17 00:00:00 2001 From: Yoshinori Tanimura Date: Thu, 19 Sep 2024 17:11:33 +0900 Subject: [PATCH] add document to XXXAnyHolder --- CHANGELOG.md | 1 + ruststep-derive/src/lib.rs | 2 ++ ruststep-derive/src/select.rs | 1 + 3 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69c68592..d1343fb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ In addition to original Keep-a-Changelog, we use following rules: - Remove `field` attr from enumerations. https://github.com/ricosjp/ruststep/pull/233 - Recursive `get_owned` for select type without boxed variant. https://github.com/ricosjp/ruststep/pull/234 - Hide `XXHolderVisitor` in document https://github.com/ricosjp/ruststep/pull/247 +- Add document to `XXAnyHolder`. https://github.com/ricosjp/ruststep/pull/248 ### Fixed - Plural class names are converted as is. https://github.com/ricosjp/ruststep/pull/245 diff --git a/ruststep-derive/src/lib.rs b/ruststep-derive/src/lib.rs index 57f5f9df..9413ebf6 100644 --- a/ruststep-derive/src/lib.rs +++ b/ruststep-derive/src/lib.rs @@ -188,6 +188,7 @@ mod snapshot_tests { let out = espr::codegen::rust::rustfmt(tt.to_string()); insta::assert_snapshot!(out, @r###" + #[doc = r" Auto-generated by `#[derive(Holder)]`"] #[derive(Clone, Debug, PartialEq)] pub enum S1Holder { A(Box), @@ -301,6 +302,7 @@ mod snapshot_tests { let out = espr::codegen::rust::rustfmt(tt.to_string()); insta::assert_snapshot!(out, @r###" + #[doc = r" Auto-generated by `#[derive(Holder)]`"] #[derive(Clone, Debug, PartialEq)] pub enum BaseAnyHolder { Base(Box), diff --git a/ruststep-derive/src/select.rs b/ruststep-derive/src/select.rs index ed8e9ac9..00204d98 100644 --- a/ruststep-derive/src/select.rs +++ b/ruststep-derive/src/select.rs @@ -96,6 +96,7 @@ impl Input { .. } = self; quote! { + /// Auto-generated by `#[derive(Holder)]` #[derive(Clone, Debug, PartialEq)] pub enum #holder_ident { #(#variants(#holder_types)),*