Skip to content

Commit f5f68d3

Browse files
committed
remove wrongly placed diagnostic attribute
1 parent c273b4a commit f5f68d3

File tree

6 files changed

+3
-16
lines changed

6 files changed

+3
-16
lines changed

packages/yew-macro/src/derive_props/builder.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ impl PropsBuilder<'_> {
127127
quote! {
128128
#[automatically_derived]
129129
#( #extra_attrs )*
130-
#[diagnostic::do_not_recommend]
131130
impl #builder_impl_generics #builder_name<#generic_args> #builder_where_clause {
132131
#( #prop_fns )*
133132
}

packages/yew-macro/tests/derive_props/fail.stderr

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ error[E0277]: not all required properties have been provided
6868
| ^^^^^ missing required properties for this component
6969
|
7070
= help: the trait `HasProp<t3::_Props::value, _>` is not implemented for `AssertAllProps`, which is required by `AssertAllProps: AllPropsFor<t3::PropsBuilder, _>`
71-
= note: make sure all required properties are set before building the component
7271
note: required for `t3::CheckPropsAll<AssertAllProps>` to implement `HasAllProps<t3::Props, (_,)>`
7372
--> tests/derive_props/fail.rs:29:21
7473
|
@@ -92,7 +91,6 @@ error[E0277]: not all required properties have been provided
9291
| ^^^^^ missing required properties for this component
9392
|
9493
= help: the trait `HasProp<t4::_Props::value, _>` is not implemented for `AssertAllProps`, which is required by `AssertAllProps: AllPropsFor<t4::PropsBuilder, _>`
95-
= note: make sure all required properties are set before building the component
9694
note: required for `t4::CheckPropsAll<AssertAllProps>` to implement `HasAllProps<t4::Props, (_,)>`
9795
--> tests/derive_props/fail.rs:41:21
9896
|

packages/yew-macro/tests/function_component_attr/generic-props-fail.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ error[E0277]: not all required properties have been provided
1616
| ^^^^ missing required properties for this component
1717
|
1818
= help: the trait `HasProp<a, _>` is not implemented for `AssertAllProps`, which is required by `AssertAllProps: AllPropsFor<PropsBuilder, _>`
19-
= note: make sure all required properties are set before building the component
2019
note: required for `CheckPropsAll<AssertAllProps>` to implement `HasAllProps<Props, (_,)>`
2120
--> tests/function_component_attr/generic-props-fail.rs:3:17
2221
|

packages/yew-macro/tests/html_macro/component-fail.stderr

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,6 @@ error[E0277]: not all required properties have been provided
578578
| ^^^^^ missing required properties for this component
579579
|
580580
= help: the trait `HasProp<int, _>` is not implemented for `AssertAllProps`, which is required by `AssertAllProps: AllPropsFor<ChildPropertiesBuilder, _>`
581-
= note: make sure all required properties are set before building the component
582581
note: required for `CheckChildPropertiesAll<AssertAllProps>` to implement `HasAllProps<ChildProperties, (_,)>`
583582
--> tests/html_macro/component-fail.rs:4:17
584583
|
@@ -629,7 +628,6 @@ error[E0277]: not all required properties have been provided
629628
| ^^^^^^^^^^^^^^ missing required properties for this component
630629
|
631630
= help: the trait `HasProp<_ChildContainerProperties::children, _>` is not implemented for `AssertAllProps`, which is required by `AssertAllProps: AllPropsFor<ChildContainerPropertiesBuilder, _>`
632-
= note: make sure all required properties are set before building the component
633631
note: required for `CheckChildContainerPropertiesAll<AssertAllProps>` to implement `HasAllProps<ChildContainerProperties, (_,)>`
634632
--> tests/html_macro/component-fail.rs:24:17
635633
|
@@ -653,7 +651,6 @@ error[E0277]: not all required properties have been provided
653651
| ^^^^^^^^^^^^^^ missing required properties for this component
654652
|
655653
= help: the trait `HasProp<_ChildContainerProperties::children, _>` is not implemented for `AssertAllProps`, which is required by `AssertAllProps: AllPropsFor<ChildContainerPropertiesBuilder, _>`
656-
= note: make sure all required properties are set before building the component
657654
note: required for `CheckChildContainerPropertiesAll<AssertAllProps>` to implement `HasAllProps<ChildContainerProperties, (_,)>`
658655
--> tests/html_macro/component-fail.rs:24:17
659656
|

packages/yew-macro/tests/html_macro/missing-props-diagnostics-fail.stderr

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ error[E0277]: not all required properties have been provided
55
| ^^^ missing required properties for this component
66
|
77
= help: the trait `HasProp<bar, _>` is not implemented for `AssertAllProps`, which is required by `AssertAllProps: AllPropsFor<FooPropsBuilder, _>`
8-
= note: make sure all required properties are set before building the component
98
note: required for `CheckFooPropsAll<AssertAllProps>` to implement `HasAllProps<FooProps, (_, _)>`
109
--> tests/html_macro/missing-props-diagnostics-fail.rs:24:10
1110
|
@@ -29,7 +28,6 @@ error[E0277]: not all required properties have been provided
2928
| ^^^ missing required properties for this component
3029
|
3130
= help: the trait `HasProp<baz, _>` is not implemented for `AssertAllProps`, which is required by `AssertAllProps: AllPropsFor<FooPropsBuilder, _>`
32-
= note: make sure all required properties are set before building the component
3331
note: required for `CheckFooPropsAll<AssertAllProps>` to implement `HasAllProps<FooProps, (_, _)>`
3432
--> tests/html_macro/missing-props-diagnostics-fail.rs:24:10
3533
|
@@ -53,7 +51,6 @@ error[E0277]: property `baz` is required but not provided
5351
| ^^^ missing required property `baz`
5452
|
5553
= help: the trait `HasProp<baz, _>` is not implemented for `AssertAllProps`, which is required by `HasFooPropsbar<AssertAllProps>: AllPropsFor<FooPropsBuilder, _>`
56-
= note: the component requires the property `baz` to be set
5754
= help: the following other types implement trait `HasProp<P, How>`:
5855
<HasFooPropsbar<B> as HasProp<bar, HasFooPropsbar<B>>>
5956
<HasFooPropsbar<B> as HasProp<P, &dyn HasProp<P, How>>>

packages/yew/src/html/component/properties.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ mod __macro {
2727
/// the conflict.
2828
#[diagnostic::on_unimplemented(
2929
message = "property `{P}` is required but not provided",
30-
label = "missing required property `{P}`",
31-
note = "the component requires the property `{P}` to be set"
30+
label = "missing required property `{P}`"
3231
)]
3332
pub trait HasProp<P, How> {}
3433

@@ -39,8 +38,7 @@ mod __macro {
3938
/// [`Properties`]: super::Properties
4039
#[diagnostic::on_unimplemented(
4140
message = "not all required properties have been provided for `{P}`",
42-
label = "missing required properties",
43-
note = "ensure all required properties are set for the component"
41+
label = "missing required properties"
4442
)]
4543
pub trait HasAllProps<P, How> {}
4644

@@ -93,8 +91,7 @@ mod __macro {
9391
/// provided to the builder.
9492
#[diagnostic::on_unimplemented(
9593
message = "not all required properties have been provided",
96-
label = "missing required properties for this component",
97-
note = "make sure all required properties are set before building the component"
94+
label = "missing required properties for this component"
9895
)]
9996
pub trait AllPropsFor<Builder, How> {}
10097

0 commit comments

Comments
 (0)