diff --git a/crates/macros/src/lib.rs b/crates/macros/src/lib.rs index 8c2c1a398..f4b0f72af 100644 --- a/crates/macros/src/lib.rs +++ b/crates/macros/src/lib.rs @@ -572,7 +572,7 @@ pub fn php_module(args: TokenStream, input: TokenStream) -> TokenStream { /// /// The rest of the options are passed as separate attributes: /// -/// - `#[php(defaults(i = 5, b = "hello")]` - Sets the default value for +/// - `#[php(defaults(i = 5, b = "hello"))]` - Sets the default value for /// parameter(s). /// - `#[php(optional = i)]` - Sets the first optional parameter. Note that this /// also sets the remaining parameters as optional, so all optional parameters diff --git a/guide/src/macros/impl.md b/guide/src/macros/impl.md index 534cb35bd..bd1a3f433 100644 --- a/guide/src/macros/impl.md +++ b/guide/src/macros/impl.md @@ -38,7 +38,7 @@ be named `self_`. This can also be used to return a reference to `$this`. The rest of the options are passed as separate attributes: -- `#[php(defaults(i = 5, b = "hello")]` - Sets the default value for parameter(s). +- `#[php(defaults(i = 5, b = "hello"))]` - Sets the default value for parameter(s). - `#[php(optional = i)]` - Sets the first optional parameter. Note that this also sets the remaining parameters as optional, so all optional parameters must be a variant of `Option`.