diff --git a/leptos_macro/tests/ui/component.rs b/leptos_macro/tests/ui/component.rs index d5ecf2cc3c..262bcc0e77 100644 --- a/leptos_macro/tests/ui/component.rs +++ b/leptos_macro/tests/ui/component.rs @@ -13,7 +13,6 @@ fn unknown_prop_option(#[prop(hello)] test: bool) -> impl IntoView { #[component] fn optional_and_optional_no_strip( - , #[prop(optional, optional_no_strip)] conflicting: bool, ) -> impl IntoView { _ = conflicting; @@ -21,7 +20,6 @@ fn optional_and_optional_no_strip( #[component] fn optional_and_strip_option( - , #[prop(optional, strip_option)] conflicting: bool, ) -> impl IntoView { _ = conflicting; @@ -29,23 +27,18 @@ fn optional_and_strip_option( #[component] fn optional_no_strip_and_strip_option( - , #[prop(optional_no_strip, strip_option)] conflicting: bool, ) -> impl IntoView { _ = conflicting; } #[component] -fn default_without_value( - , - #[prop(default)] default: bool, -) -> impl IntoView { +fn default_without_value(#[prop(default)] default: bool) -> impl IntoView { _ = default; } #[component] fn default_with_invalid_value( - , #[prop(default= |)] default: bool, ) -> impl IntoView { _ = default; diff --git a/leptos_macro/tests/ui/component.stderr b/leptos_macro/tests/ui/component.stderr index 37563cdae2..7a425f79ba 100644 --- a/leptos_macro/tests/ui/component.stderr +++ b/leptos_macro/tests/ui/component.stderr @@ -1,33 +1,3 @@ -error: expected parameter name, found `,` - --> tests/ui/component.rs:16:5 - | -16 | , - | ^ expected parameter name - -error: expected parameter name, found `,` - --> tests/ui/component.rs:24:5 - | -24 | , - | ^ expected parameter name - -error: expected parameter name, found `,` - --> tests/ui/component.rs:32:5 - | -32 | , - | ^ expected parameter name - -error: expected parameter name, found `,` - --> tests/ui/component.rs:40:5 - | -40 | , - | ^ expected parameter name - -error: expected parameter name, found `,` - --> tests/ui/component.rs:48:5 - | -48 | , - | ^ expected parameter name - error: return type is incorrect --> tests/ui/component.rs:4:1 | @@ -50,32 +20,34 @@ error: supported fields are `optional`, `optional_no_strip`, `strip_option`, `de 10 | fn unknown_prop_option(#[prop(hello)] test: bool) -> impl IntoView { | ^^^^^ -error: expected one of: identifier, `::`, `<`, `_`, literal, `const`, `ref`, `mut`, `&`, parentheses, square brackets, `..`, `const` - --> tests/ui/component.rs:16:5 +error: `optional` conflicts with mutually exclusive `optional_no_strip` + --> tests/ui/component.rs:16:12 | -16 | , - | ^ +16 | #[prop(optional, optional_no_strip)] conflicting: bool, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: expected one of: identifier, `::`, `<`, `_`, literal, `const`, `ref`, `mut`, `&`, parentheses, square brackets, `..`, `const` - --> tests/ui/component.rs:24:5 +error: `optional` conflicts with mutually exclusive `strip_option` + --> tests/ui/component.rs:23:12 | -24 | , - | ^ +23 | #[prop(optional, strip_option)] conflicting: bool, + | ^^^^^^^^^^^^^^^^^^^^^^ -error: expected one of: identifier, `::`, `<`, `_`, literal, `const`, `ref`, `mut`, `&`, parentheses, square brackets, `..`, `const` - --> tests/ui/component.rs:32:5 +error: `optional_no_strip` conflicts with mutually exclusive `strip_option` + --> tests/ui/component.rs:30:12 | -32 | , - | ^ +30 | #[prop(optional_no_strip, strip_option)] conflicting: bool, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: expected one of: identifier, `::`, `<`, `_`, literal, `const`, `ref`, `mut`, `&`, parentheses, square brackets, `..`, `const` - --> tests/ui/component.rs:40:5 +error: unexpected end of input, expected assignment `=` + --> tests/ui/component.rs:36:40 | -40 | , - | ^ +36 | fn default_without_value(#[prop(default)] default: bool) -> impl IntoView { + | ^ + +error: unexpected end of input, expected one of: identifier, `::`, `<`, `_`, literal, `const`, `ref`, `mut`, `&`, parentheses, square brackets, `..`, `const` -error: expected one of: identifier, `::`, `<`, `_`, literal, `const`, `ref`, `mut`, `&`, parentheses, square brackets, `..`, `const` - --> tests/ui/component.rs:48:5 + = help: try `#[prop(default=5 * 10)]` + --> tests/ui/component.rs:42:22 | -48 | , - | ^ +42 | #[prop(default= |)] default: bool, + | ^