@@ -67,14 +67,14 @@ use crate::util::ident;
6767/// ```
6868///
6969/// The generated `init` function will initialize each struct field (except the field of type `Base<T>`, if any)
70- /// using `Default::default()`. To assign some other value, annotate the field with `#[init(default = ...)]`:
70+ /// using `Default::default()`. To assign some other value, annotate the field with `#[init(val = ...)]`:
7171///
7272/// ```
7373/// # use godot_macros::GodotClass;
7474/// #[derive(GodotClass)]
7575/// #[class(init)]
7676/// struct MyStruct {
77- /// #[init(default = 42)]
77+ /// #[init(val = 42)]
7878/// my_field: i64
7979/// }
8080/// ```
@@ -91,7 +91,7 @@ use crate::util::ident;
9191/// # #[derive(GodotClass)]
9292/// # #[class(init)]
9393/// # struct MyStruct {
94- /// #[init(default = (HashMap::<i64, i64>::new()))]
94+ /// #[init(val = (HashMap::<i64, i64>::new()))]
9595/// // ^ parentheses needed due to this comma
9696/// my_field: HashMap<i64, i64>,
9797/// # }
@@ -544,7 +544,7 @@ pub fn derive_godot_class(input: TokenStream) -> TokenStream {
544544///
545545/// ## Generated `init`
546546///
547- /// This initializes the `Base<T>` field, and every other field with either `Default::default()` or the value specified in `#[init(default = ...)]`.
547+ /// This initializes the `Base<T>` field, and every other field with either `Default::default()` or the value specified in `#[init(val = ...)]`.
548548///
549549/// ```no_run
550550/// # use godot::prelude::*;
@@ -553,7 +553,7 @@ pub fn derive_godot_class(input: TokenStream) -> TokenStream {
553553/// pub struct MyNode {
554554/// base: Base<Node>,
555555///
556- /// #[init(default = 42)]
556+ /// #[init(val = 42)]
557557/// some_integer: i64,
558558/// }
559559/// ```
0 commit comments