@@ -124,18 +124,12 @@ use crate::util::ident;
124124/// #[var]
125125/// my_field: i64,
126126/// }
127- ///
128- /// #[godot_api]
129- /// impl MyStruct {}
130127/// ```
131128///
132129/// This makes the field accessible in GDScript using `my_struct.my_field` syntax. Additionally, it
133130/// generates a trivial getter and setter named `get_my_field` and `set_my_field`, respectively.
134131/// These are `pub` in Rust, since they're exposed from GDScript anyway.
135132///
136- /// For technical reasons, an impl-block with the `#[godot_api]` attribute is required for properties to
137- /// work. Failing to include one will cause a compile error if you try to create any properties.
138- ///
139133/// If you want to implement your own getter and/or setter, write those as a function on your Rust
140134/// type, expose it using `#[func]`, and annotate the field with
141135/// `#[export(get = ..., set = ...)]`:
@@ -196,9 +190,6 @@ use crate::util::ident;
196190/// #[export]
197191/// my_field: i64,
198192/// }
199- ///
200- /// #[godot_api]
201- /// impl MyStruct {}
202193/// ```
203194///
204195/// If you dont also include a `#[var]` attribute, then a default one will be generated.
@@ -252,9 +243,6 @@ use crate::util::ident;
252243/// #[export(flags = (A = 1, B = 2, AB = 3))]
253244/// flags: u32,
254245/// }
255- ///
256- /// #[godot_api]
257- /// impl MyStruct {}
258246/// ```
259247///
260248/// Most values in expressions like `key = value`, can be an arbitrary expression that evaluates to the
@@ -274,9 +262,6 @@ use crate::util::ident;
274262/// #[export(flags = (A = 0b0001, B = 0b0010, C = 0b0100, D = 0b1000))]
275263/// flags: u32,
276264/// }
277- ///
278- /// #[godot_api]
279- /// impl MyStruct {}
280265/// ```
281266///
282267/// You can specify custom property hints, hint strings, and usage flags in a `#[var]` attribute using the
@@ -297,9 +282,6 @@ use crate::util::ident;
297282/// )]
298283/// my_field: i64,
299284/// }
300- ///
301- /// #[godot_api]
302- /// impl MyStruct {}
303285/// ```
304286///
305287///
@@ -541,10 +523,6 @@ pub fn derive_from_godot(input: TokenStream) -> TokenStream {
541523/// foo: TestEnum
542524/// }
543525///
544- /// # //TODO: remove this when https://github.com/godot-rust/gdext/issues/187 is truly addressed
545- /// # #[godot_api]
546- /// # impl TestClass {}
547- ///
548526/// # fn main() {
549527/// let mut class = TestClass {foo: TestEnum::B};
550528/// assert_eq!(class.get_foo(), TestEnum::B as i32);
0 commit comments