File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
crates/stackable-versioned-macros/src/codegen/common Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 32
32
fn generate_tokens ( & self ) -> TokenStream ;
33
33
}
34
34
35
+ /// This struct bundles values from [`DeriveInput`][1].
36
+ ///
37
+ /// [`DeriveInput`][1] cannot be used directly when constructing a
38
+ /// [`VersionedStruct`][2] or [`VersionedEnum`][3] because we run into borrow
39
+ /// issues caused by the match statement which extracts the data.
40
+ ///
41
+ /// [1]: syn::DeriveInput
42
+ /// [2]: crate::codegen::vstruct::VersionedStruct
43
+ /// [3]: crate::codegen::venum::VersionedEnum
35
44
pub ( crate ) struct ContainerInput {
36
45
pub ( crate ) original_attributes : Vec < Attribute > ,
37
46
pub ( crate ) visibility : Visibility ,
@@ -56,6 +65,8 @@ pub(crate) struct VersionedContainer<I> {
56
65
/// The ident, or name, of the versioned container.
57
66
pub ( crate ) ident : Ident ,
58
67
68
+ /// The visibility of the versioned container. Used to forward the
69
+ /// visibility during code generation.
59
70
pub ( crate ) visibility : Visibility ,
60
71
61
72
/// The original attributes that were added to the container.
You can’t perform that action at this time.
0 commit comments