From 7f0288dc760bf3be00fae43b4e2baefac01625b0 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Sat, 29 Jul 2023 14:05:55 +0200 Subject: [PATCH] Update stderr files --- .../tests/classes_macro/classes-fail.stderr | 138 +++++++------ .../yew-macro/tests/derive_props/fail.stderr | 112 +++++----- .../bad-return-type-fail.stderr | 3 + .../generic-props-fail.stderr | 55 ++--- .../tests/html_macro/component-fail.stderr | 118 +++++++---- .../component-unimplemented-fail.stderr | 35 ++-- .../tests/html_macro/element-fail.stderr | 191 ++++++++++++++---- .../tests/html_macro/iterable-fail.stderr | 76 +++---- .../tests/html_macro/node-fail.stderr | 27 +++ .../tests/props_macro/props-fail.stderr | 4 +- .../props_macro/resolve-prop-fail.stderr | 4 + 11 files changed, 498 insertions(+), 265 deletions(-) diff --git a/packages/yew-macro/tests/classes_macro/classes-fail.stderr b/packages/yew-macro/tests/classes_macro/classes-fail.stderr index becd5587283..57cf0f21fb7 100644 --- a/packages/yew-macro/tests/classes_macro/classes-fail.stderr +++ b/packages/yew-macro/tests/classes_macro/classes-fail.stderr @@ -11,64 +11,76 @@ error: string literals must not contain more than one class (hint: use `"two", " | ^^^^^^^^^^^ error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied - --> tests/classes_macro/classes-fail.rs:4:14 - | -4 | classes!(42); - | ^^ the trait `From<{integer}>` is not implemented for `Classes` - | - = help: the following implementations were found: - > - >> - > - > - and 6 others - = note: required because of the requirements on the impl of `Into` for `{integer}` + --> tests/classes_macro/classes-fail.rs:4:14 + | +4 | classes!(42); + | ^^ the trait `From<{integer}>` is not implemented for `Classes` + | + = help: the following other types implement trait `From`: + > + >> + > + > + > + >> + >> + > + and $N others + = note: required because of the requirements on the impl of `Into` for `{integer}` note: required by a bound in `Classes::push` - --> $WORKSPACE/packages/yew/src/html/classes.rs - | - | pub fn push>(&mut self, class: T) { - | ^^^^^^^^^^ required by this bound in `Classes::push` + --> $WORKSPACE/packages/yew/src/html/classes.rs + | + | pub fn push>(&mut self, class: T) { + | ^^^^^^^^^^ required by this bound in `Classes::push` error[E0277]: the trait bound `Classes: From<{float}>` is not satisfied - --> tests/classes_macro/classes-fail.rs:5:14 - | -5 | classes!(42.0); - | ^^^^ the trait `From<{float}>` is not implemented for `Classes` - | - = help: the following implementations were found: - > - >> - > - > - and 6 others - = note: required because of the requirements on the impl of `Into` for `{float}` + --> tests/classes_macro/classes-fail.rs:5:14 + | +5 | classes!(42.0); + | ^^^^ the trait `From<{float}>` is not implemented for `Classes` + | + = help: the following other types implement trait `From`: + > + >> + > + > + > + >> + >> + > + and $N others + = note: required because of the requirements on the impl of `Into` for `{float}` note: required by a bound in `Classes::push` - --> $WORKSPACE/packages/yew/src/html/classes.rs - | - | pub fn push>(&mut self, class: T) { - | ^^^^^^^^^^ required by this bound in `Classes::push` + --> $WORKSPACE/packages/yew/src/html/classes.rs + | + | pub fn push>(&mut self, class: T) { + | ^^^^^^^^^^ required by this bound in `Classes::push` error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied - --> tests/classes_macro/classes-fail.rs:9:14 - | -9 | classes!(vec![42]); - | ^^^ the trait `From<{integer}>` is not implemented for `Classes` - | - = help: the following implementations were found: - > - >> - > - > - and 6 others - = note: required because of the requirements on the impl of `Into` for `{integer}` - = note: required because of the requirements on the impl of `From>` for `Classes` - = note: 1 redundant requirement hidden - = note: required because of the requirements on the impl of `Into` for `Vec<{integer}>` + --> tests/classes_macro/classes-fail.rs:9:14 + | +9 | classes!(vec![42]); + | ^^^ the trait `From<{integer}>` is not implemented for `Classes` + | + = help: the following other types implement trait `From`: + > + >> + > + > + > + >> + >> + > + and $N others + = note: required because of the requirements on the impl of `Into` for `{integer}` + = note: required because of the requirements on the impl of `From>` for `Classes` + = note: 1 redundant requirement hidden + = note: required because of the requirements on the impl of `Into` for `Vec<{integer}>` note: required by a bound in `Classes::push` - --> $WORKSPACE/packages/yew/src/html/classes.rs - | - | pub fn push>(&mut self, class: T) { - | ^^^^^^^^^^ required by this bound in `Classes::push` + --> $WORKSPACE/packages/yew/src/html/classes.rs + | + | pub fn push>(&mut self, class: T) { + | ^^^^^^^^^^ required by this bound in `Classes::push` error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied --> tests/classes_macro/classes-fail.rs:13:14 @@ -76,12 +88,16 @@ error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied 13 | classes!(some); | ^^^^ the trait `From<{integer}>` is not implemented for `Classes` | - = help: the following implementations were found: + = help: the following other types implement trait `From`: > >> > > - and 6 others + > + >> + >> + > + and $N others = note: required because of the requirements on the impl of `Into` for `{integer}` = note: required because of the requirements on the impl of `From>` for `Classes` = note: 1 redundant requirement hidden @@ -98,12 +114,16 @@ error[E0277]: the trait bound `Classes: From` is not satisfied 14 | classes!(none); | ^^^^ the trait `From` is not implemented for `Classes` | - = help: the following implementations were found: + = help: the following other types implement trait `From`: > >> > > - and 6 others + > + >> + >> + > + and $N others = note: required because of the requirements on the impl of `Into` for `u32` = note: required because of the requirements on the impl of `From>` for `Classes` = note: 1 redundant requirement hidden @@ -120,12 +140,16 @@ error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied 16 | classes!("one", 42); | ^^ the trait `From<{integer}>` is not implemented for `Classes` | - = help: the following implementations were found: + = help: the following other types implement trait `From`: > >> > > - and 6 others + > + >> + >> + > + and $N others = note: required because of the requirements on the impl of `Into` for `{integer}` note: required by a bound in `Classes::push` --> $WORKSPACE/packages/yew/src/html/classes.rs diff --git a/packages/yew-macro/tests/derive_props/fail.stderr b/packages/yew-macro/tests/derive_props/fail.stderr index 35c88342d29..441b184c78d 100644 --- a/packages/yew-macro/tests/derive_props/fail.stderr +++ b/packages/yew-macro/tests/derive_props/fail.stderr @@ -25,33 +25,18 @@ note: these functions exist but are inaccessible 102 | fn foo() -> i32 { | ^^^^^^^^^^^^^^^ `crate::t10::foo`: not accessible -error[E0277]: the trait bound `AssertAllProps: HasProp` is not satisfied - --> tests/derive_props/fail.rs:35:24 - | -35 | ::yew::props!{ Props { } }; - | ^^^^^ the trait `HasProp` is not implemented for `AssertAllProps` - | -note: required because of the requirements on the impl of `HasAllProps` for `t3::CheckPropsAll` - --> tests/derive_props/fail.rs:29:21 - | -29 | #[derive(Clone, Properties, PartialEq)] - | ^^^^^^^^^^ - = note: required because of the requirements on the impl of `AllPropsFor` for `AssertAllProps` -note: required by a bound in `html::component::properties::__macro::PreBuild::::build` - --> $WORKSPACE/packages/yew/src/html/component/properties.rs - | - | Token: AllPropsFor, - | ^^^^^^^^^^^^^^^^^^^ required by this bound in `html::component::properties::__macro::PreBuild::::build` - = note: this error originates in the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) - error[E0277]: the trait bound `Value: Default` is not satisfied - --> tests/derive_props/fail.rs:9:21 - | -9 | #[derive(Clone, Properties, PartialEq)] - | ^^^^^^^^^^ the trait `Default` is not implemented for `Value` - | + --> tests/derive_props/fail.rs:9:21 + | +9 | #[derive(Clone, Properties, PartialEq)] + | ^^^^^^^^^^ the trait `Default` is not implemented for `Value` + | note: required by a bound in `Option::::unwrap_or_default` - = note: this error originates in the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) +help: consider annotating `Value` with `#[derive(Default)]` + | +8 | #[derive(Default)] + | error[E0369]: binary operation `==` cannot be applied to type `Value` --> tests/derive_props/fail.rs:13:9 @@ -66,7 +51,7 @@ note: an implementation of `PartialEq<_>` might be missing for `Value` --> tests/derive_props/fail.rs:8:5 | 8 | struct Value; - | ^^^^^^^^^^^^^ must implement `PartialEq<_>` + | ^^^^^^^^^^^^ must implement `PartialEq<_>` = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider annotating `Value` with `#[derive(PartialEq)]` | @@ -86,19 +71,52 @@ note: an implementation of `PartialEq<_>` might be missing for `Value` --> tests/derive_props/fail.rs:8:5 | 8 | struct Value; - | ^^^^^^^^^^^^^ must implement `PartialEq<_>` + | ^^^^^^^^^^^^ must implement `PartialEq<_>` = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider annotating `Value` with `#[derive(PartialEq)]` | 8 | #[derive(PartialEq)] | +error[E0277]: the trait bound `AssertAllProps: HasProp` is not satisfied + --> tests/derive_props/fail.rs:35:24 + | +35 | ::yew::props!{ Props { } }; + | ^^^^^ the trait `HasProp` is not implemented for `AssertAllProps` + | + = help: the following other types implement trait `HasProp`: + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + and $N others +note: required because of the requirements on the impl of `HasAllProps` for `t3::CheckPropsAll` + --> tests/derive_props/fail.rs:29:21 + | +29 | #[derive(Clone, Properties, PartialEq)] + | ^^^^^^^^^^ + = note: required because of the requirements on the impl of `AllPropsFor` for `AssertAllProps` +note: required by a bound in `html::component::properties::__macro::PreBuild::::build` + --> $WORKSPACE/packages/yew/src/html/component/properties.rs + | + | Token: AllPropsFor, + | ^^^^^^^^^^^^^^^^^^^ required by this bound in `html::component::properties::__macro::PreBuild::::build` + = note: this error originates in the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) + error[E0308]: mismatched types --> tests/derive_props/fail.rs:54:19 | 54 | #[prop_or(123)] - | ^^^ expected struct `String`, found integer + | ^^^ + | | + | expected struct `String`, found integer + | arguments to this function are incorrect | +note: associated function defined here help: try using a conversion method | 54 | #[prop_or(123.to_string())] @@ -107,30 +125,30 @@ help: try using a conversion method | ++++++++++++ error[E0277]: expected a `FnOnce<()>` closure, found `{integer}` - --> tests/derive_props/fail.rs:64:24 - | -64 | #[prop_or_else(123)] - | ^^^ expected an `FnOnce<()>` closure, found `{integer}` - | - = help: the trait `FnOnce<()>` is not implemented for `{integer}` - = note: wrap the `{integer}` in a closure with no arguments: `|| { /* code */ }` + --> tests/derive_props/fail.rs:64:24 + | +64 | #[prop_or_else(123)] + | ^^^ expected an `FnOnce<()>` closure, found `{integer}` + | + = help: the trait `FnOnce<()>` is not implemented for `{integer}` + = note: wrap the `{integer}` in a closure with no arguments: `|| { /* code */ }` note: required by a bound in `Option::::unwrap_or_else` error[E0593]: function is expected to take 0 arguments, but it takes 1 argument - --> tests/derive_props/fail.rs:84:24 - | -84 | #[prop_or_else(foo)] - | ^^^ expected function that takes 0 arguments + --> tests/derive_props/fail.rs:84:24 + | +84 | #[prop_or_else(foo)] + | ^^^ expected function that takes 0 arguments ... -88 | fn foo(bar: i32) -> String { - | -------------------------- takes 1 argument - | +88 | fn foo(bar: i32) -> String { + | -------------------------- takes 1 argument + | note: required by a bound in `Option::::unwrap_or_else` error[E0271]: type mismatch resolving ` i32 {t10::foo} as FnOnce<()>>::Output == String` - --> tests/derive_props/fail.rs:98:24 - | -98 | #[prop_or_else(foo)] - | ^^^ expected struct `String`, found `i32` - | + --> tests/derive_props/fail.rs:98:24 + | +98 | #[prop_or_else(foo)] + | ^^^ expected struct `String`, found `i32` + | note: required by a bound in `Option::::unwrap_or_else` diff --git a/packages/yew-macro/tests/function_component_attr/bad-return-type-fail.stderr b/packages/yew-macro/tests/function_component_attr/bad-return-type-fail.stderr index 6e99e7d6473..9b8e8a2ab5d 100644 --- a/packages/yew-macro/tests/function_component_attr/bad-return-type-fail.stderr +++ b/packages/yew-macro/tests/function_component_attr/bad-return-type-fail.stderr @@ -10,4 +10,7 @@ error[E0277]: the trait bound `u32: IntoHtmlResult` is not satisfied 11 | #[function_component(Comp)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `IntoHtmlResult` is not implemented for `u32` | + = help: the following other types implement trait `IntoHtmlResult`: + Result + VNode = note: this error originates in the attribute macro `function_component` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/packages/yew-macro/tests/function_component_attr/generic-props-fail.stderr b/packages/yew-macro/tests/function_component_attr/generic-props-fail.stderr index e298c0cc8ac..e60f09af641 100644 --- a/packages/yew-macro/tests/function_component_attr/generic-props-fail.stderr +++ b/packages/yew-macro/tests/function_component_attr/generic-props-fail.stderr @@ -13,6 +13,16 @@ error[E0277]: the trait bound `AssertAllProps: HasProp` is not satisfied 22 | html! { /> }; | ^^^^ the trait `HasProp` is not implemented for `AssertAllProps` | + = help: the following other types implement trait `HasProp`: + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + and $N others note: required because of the requirements on the impl of `HasAllProps` for `CheckPropsAll` --> tests/function_component_attr/generic-props-fail.rs:3:17 | @@ -24,7 +34,7 @@ note: required by a bound in `yew::html::component::properties::__macro::PreBuil | | Token: AllPropsFor, | ^^^^^^^^^^^^^^^^^^^ required by this bound in `yew::html::component::properties::__macro::PreBuild::::build` - = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `html` which comes from the expansion of the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `Comp: yew::BaseComponent` is not satisfied --> tests/function_component_attr/generic-props-fail.rs:27:14 @@ -32,33 +42,26 @@ error[E0277]: the trait bound `Comp: yew::BaseComponent` is n 27 | html! { /> }; | ^^^^ the trait `yew::BaseComponent` is not implemented for `Comp` | - = help: the following implementations were found: - as yew::BaseComponent> + = help: the trait `yew::BaseComponent` is implemented for `Comp

` = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0599]: the function or associated item `new` exists for struct `VChild>`, but its trait bounds were not satisfied - --> tests/function_component_attr/generic-props-fail.rs:27:14 - | -8 | #[function_component(Comp)] - | --------------------------- doesn't satisfy `Comp: yew::BaseComponent` + --> tests/function_component_attr/generic-props-fail.rs:27:14 + | +8 | #[function_component(Comp)] + | ------------------------- doesn't satisfy `Comp: yew::BaseComponent` ... -27 | html! { /> }; - | ^^^^ function or associated item cannot be called on `VChild>` due to unsatisfied trait bounds - | - = note: the following trait bounds were not satisfied: - `Comp: yew::BaseComponent` +27 | html! { /> }; + | ^^^^ function or associated item cannot be called on `VChild>` due to unsatisfied trait bounds + | + = note: the following trait bounds were not satisfied: + `Comp: yew::BaseComponent` note: the following trait must be implemented - --> $WORKSPACE/packages/yew/src/html/component/mod.rs - | - | / pub trait BaseComponent: Sized + 'static { - | | /// The Component's Message. - | | type Message: 'static; - | | -... | - | | fn prepare_state(&self) -> Option; - | | } - | |_^ - = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) + --> $WORKSPACE/packages/yew/src/html/component/mod.rs + | + | pub trait BaseComponent: Sized + 'static { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `MissingTypeBounds: yew::Properties` is not satisfied --> tests/function_component_attr/generic-props-fail.rs:27:14 @@ -66,6 +69,12 @@ error[E0277]: the trait bound `MissingTypeBounds: yew::Properties` is not satisf 27 | html! { /> }; | ^^^^ the trait `yew::Properties` is not implemented for `MissingTypeBounds` | + = help: the following other types implement trait `yew::Properties`: + () + ChildrenProps + ContextProviderProps + Props + SuspenseProps note: required by a bound in `Comp` --> tests/function_component_attr/generic-props-fail.rs:11:8 | diff --git a/packages/yew-macro/tests/html_macro/component-fail.stderr b/packages/yew-macro/tests/html_macro/component-fail.stderr index 40917e85ac7..371362c18bc 100644 --- a/packages/yew-macro/tests/html_macro/component-fail.stderr +++ b/packages/yew-macro/tests/html_macro/component-fail.stderr @@ -433,7 +433,7 @@ error[E0599]: no method named `r#type` found for struct `ChildPropertiesBuilder` --> tests/html_macro/component-fail.rs:85:20 | 4 | #[derive(Clone, Properties, PartialEq)] - | ---------- method `r#type` not found for this + | ---------- method `r#type` not found for this struct ... 85 | html! { }; | ^^^^ method not found in `ChildPropertiesBuilder` @@ -450,7 +450,7 @@ error[E0599]: no method named `unknown` found for struct `ChildPropertiesBuilder --> tests/html_macro/component-fail.rs:88:20 | 4 | #[derive(Clone, Properties, PartialEq)] - | ---------- method `unknown` not found for this + | ---------- method `unknown` not found for this struct ... 88 | html! { }; | ^^^^^^^ method not found in `ChildPropertiesBuilder` @@ -463,6 +463,16 @@ error[E0277]: the trait bound `(): IntoPropValue` is not satisfied | | | required by a bound introduced by this call | + = help: the following other types implement trait `IntoPropValue`: + <&'static [(K, V)] as IntoPropValue>> + <&'static [T] as IntoPropValue>> + <&'static str as IntoPropValue> + <&'static str as IntoPropValue>> + <&'static str as IntoPropValue>> + <&'static str as IntoPropValue> + <&'static str as IntoPropValue> + <&T as IntoPropValue>> + and $N others note: required by a bound in `ChildPropertiesBuilder::string` --> tests/html_macro/component-fail.rs:4:17 | @@ -481,11 +491,15 @@ error[E0277]: the trait bound `{integer}: IntoPropValue` is not satisfie | | | required by a bound introduced by this call | - = help: the following implementations were found: - >> - >> - >> - >> + = help: the following other types implement trait `IntoPropValue`: + f32 + f64 + i128 + i16 + i32 + i64 + i8 + isize and $N others note: required by a bound in `ChildPropertiesBuilder::string` --> tests/html_macro/component-fail.rs:4:17 @@ -505,11 +519,15 @@ error[E0277]: the trait bound `{integer}: IntoPropValue` is not satisfie | | | required by a bound introduced by this call | - = help: the following implementations were found: - >> - >> - >> - >> + = help: the following other types implement trait `IntoPropValue`: + f32 + f64 + i128 + i16 + i32 + i64 + i8 + isize and $N others note: required by a bound in `ChildPropertiesBuilder::string` --> tests/html_macro/component-fail.rs:4:17 @@ -533,7 +551,7 @@ error[E0599]: no method named `r#ref` found for struct `ChildPropertiesBuilder` --> tests/html_macro/component-fail.rs:96:26 | 4 | #[derive(Clone, Properties, PartialEq)] - | ---------- method `r#ref` not found for this + | ---------- method `r#ref` not found for this struct ... 96 | html! { }; | ^^^^^ method not found in `ChildPropertiesBuilder` @@ -546,11 +564,15 @@ error[E0277]: the trait bound `u32: IntoPropValue` is not satisfied | | | required by a bound introduced by this call | - = help: the following implementations were found: - >> - >> - >> - >> + = help: the following other types implement trait `IntoPropValue`: + f32 + f64 + i128 + i16 + i32 + i64 + i8 + isize and $N others note: required by a bound in `ChildPropertiesBuilder::int` --> tests/html_macro/component-fail.rs:4:17 @@ -568,6 +590,16 @@ error[E0277]: the trait bound `AssertAllProps: HasProp` is not satisfied 99 | html! { }; | ^^^^^ the trait `HasProp` is not implemented for `AssertAllProps` | + = help: the following other types implement trait `HasProp`: + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp<_ChildContainerProperties::children, HasChildContainerPropertieschildren>> + as HasProp>> + and $N others note: required because of the requirements on the impl of `HasAllProps` for `CheckChildPropertiesAll` --> tests/html_macro/component-fail.rs:4:17 | @@ -579,7 +611,7 @@ note: required by a bound in `yew::html::component::properties::__macro::PreBuil | | Token: AllPropsFor, | ^^^^^^^^^^^^^^^^^^^ required by this bound in `yew::html::component::properties::__macro::PreBuild::::build` - = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `html` which comes from the expansion of the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0609]: no field `children` on type `ChildProperties` --> tests/html_macro/component-fail.rs:103:14 @@ -594,7 +626,7 @@ error[E0599]: no method named `children` found for struct `ChildPropertiesBuilde --> tests/html_macro/component-fail.rs:103:14 | 4 | #[derive(Clone, Properties, PartialEq)] - | ---------- method `children` not found for this + | ---------- method `children` not found for this struct ... 103 | html! { { "Not allowed" } }; | ^^^^^ method not found in `ChildPropertiesBuilder` @@ -616,6 +648,16 @@ error[E0277]: the trait bound `AssertAllProps: HasProp<_ChildContainerProperties 115 | html! { }; | ^^^^^^^^^^^^^^ the trait `HasProp<_ChildContainerProperties::children, _>` is not implemented for `AssertAllProps` | + = help: the following other types implement trait `HasProp`: + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp<_ChildContainerProperties::children, HasChildContainerPropertieschildren>> + as HasProp>> + and $N others note: required because of the requirements on the impl of `HasAllProps` for `CheckChildContainerPropertiesAll` --> tests/html_macro/component-fail.rs:24:17 | @@ -627,7 +669,7 @@ note: required by a bound in `yew::html::component::properties::__macro::PreBuil | | Token: AllPropsFor, | ^^^^^^^^^^^^^^^^^^^ required by this bound in `yew::html::component::properties::__macro::PreBuild::::build` - = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `html` which comes from the expansion of the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `AssertAllProps: HasProp<_ChildContainerProperties::children, _>` is not satisfied --> tests/html_macro/component-fail.rs:116:14 @@ -635,6 +677,16 @@ error[E0277]: the trait bound `AssertAllProps: HasProp<_ChildContainerProperties 116 | html! { }; | ^^^^^^^^^^^^^^ the trait `HasProp<_ChildContainerProperties::children, _>` is not implemented for `AssertAllProps` | + = help: the following other types implement trait `HasProp`: + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp<_ChildContainerProperties::children, HasChildContainerPropertieschildren>> + as HasProp>> + and $N others note: required because of the requirements on the impl of `HasAllProps` for `CheckChildContainerPropertiesAll` --> tests/html_macro/component-fail.rs:24:17 | @@ -646,18 +698,15 @@ note: required by a bound in `yew::html::component::properties::__macro::PreBuil | | Token: AllPropsFor, | ^^^^^^^^^^^^^^^^^^^ required by this bound in `yew::html::component::properties::__macro::PreBuild::::build` - = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `html` which comes from the expansion of the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `yew::virtual_dom::VText: IntoPropValue>>` is not satisfied - --> tests/html_macro/component-fail.rs:117:31 + --> tests/html_macro/component-fail.rs:117:14 | 117 | html! { { "Not allowed" } }; - | -------------- ^^^^^^^^^^^^^ the trait `IntoPropValue>>` is not implemented for `yew::virtual_dom::VText` - | | - | required by a bound introduced by this call + | ^^^^^^^^^^^^^^ the trait `IntoPropValue>>` is not implemented for `yew::virtual_dom::VText` | - = help: the following implementations were found: - >> + = help: the trait `IntoPropValue>` is implemented for `yew::virtual_dom::VText` note: required by a bound in `ChildContainerPropertiesBuilder::children` --> tests/html_macro/component-fail.rs:24:17 | @@ -666,7 +715,7 @@ note: required by a bound in `ChildContainerPropertiesBuilder::children` 25 | pub struct ChildContainerProperties { 26 | pub children: ChildrenWithProps, | -------- required by a bound in this - = note: this error originates in the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `html` which comes from the expansion of the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `VChild: From` is not satisfied --> tests/html_macro/component-fail.rs:118:29 @@ -677,15 +726,12 @@ error[E0277]: the trait bound `VChild: From` is not satisfied = note: required because of the requirements on the impl of `Into>` for `VNode` error[E0277]: the trait bound `VNode: IntoPropValue>>` is not satisfied - --> tests/html_macro/component-fail.rs:119:30 + --> tests/html_macro/component-fail.rs:119:14 | 119 | html! { }; - | -------------- ^^^^^ the trait `IntoPropValue>>` is not implemented for `VNode` - | | - | required by a bound introduced by this call + | ^^^^^^^^^^^^^^ the trait `IntoPropValue>>` is not implemented for `VNode` | - = help: the following implementations were found: - >> + = help: the trait `IntoPropValue>` is implemented for `VNode` note: required by a bound in `ChildContainerPropertiesBuilder::children` --> tests/html_macro/component-fail.rs:24:17 | @@ -694,4 +740,4 @@ note: required by a bound in `ChildContainerPropertiesBuilder::children` 25 | pub struct ChildContainerProperties { 26 | pub children: ChildrenWithProps, | -------- required by a bound in this - = note: this error originates in the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `html` which comes from the expansion of the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/packages/yew-macro/tests/html_macro/component-unimplemented-fail.stderr b/packages/yew-macro/tests/html_macro/component-unimplemented-fail.stderr index 480c0693b39..b229ced60b6 100644 --- a/packages/yew-macro/tests/html_macro/component-unimplemented-fail.stderr +++ b/packages/yew-macro/tests/html_macro/component-unimplemented-fail.stderr @@ -4,29 +4,24 @@ error[E0277]: the trait bound `Unimplemented: yew::Component` is not satisfied 6 | html! { }; | ^^^^^^^^^^^^^ the trait `yew::Component` is not implemented for `Unimplemented` | + = help: the trait `yew::Component` is implemented for `ContextProvider` = note: required because of the requirements on the impl of `BaseComponent` for `Unimplemented` = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0599]: the function or associated item `new` exists for struct `VChild`, but its trait bounds were not satisfied - --> tests/html_macro/component-unimplemented-fail.rs:6:14 - | -3 | struct Unimplemented; - | --------------------- doesn't satisfy `Unimplemented: BaseComponent` + --> tests/html_macro/component-unimplemented-fail.rs:6:14 + | +3 | struct Unimplemented; + | -------------------- doesn't satisfy `Unimplemented: BaseComponent` ... -6 | html! { }; - | ^^^^^^^^^^^^^ function or associated item cannot be called on `VChild` due to unsatisfied trait bounds - | - = note: the following trait bounds were not satisfied: - `Unimplemented: BaseComponent` +6 | html! { }; + | ^^^^^^^^^^^^^ function or associated item cannot be called on `VChild` due to unsatisfied trait bounds + | + = note: the following trait bounds were not satisfied: + `Unimplemented: BaseComponent` note: the following trait must be implemented - --> $WORKSPACE/packages/yew/src/html/component/mod.rs - | - | / pub trait BaseComponent: Sized + 'static { - | | /// The Component's Message. - | | type Message: 'static; - | | -... | - | | fn prepare_state(&self) -> Option; - | | } - | |_^ - = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) + --> $WORKSPACE/packages/yew/src/html/component/mod.rs + | + | pub trait BaseComponent: Sized + 'static { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/packages/yew-macro/tests/html_macro/element-fail.stderr b/packages/yew-macro/tests/html_macro/element-fail.stderr index ecb38f61c01..1946d88f0f1 100644 --- a/packages/yew-macro/tests/html_macro/element-fail.stderr +++ b/packages/yew-macro/tests/html_macro/element-fail.stderr @@ -369,22 +369,40 @@ error[E0308]: mismatched types --> tests/html_macro/element-fail.rs:36:28 | 36 | html! { }; - | ^ expected `bool`, found integer + | -----------------------^----- + | | | + | | expected `bool`, found integer + | arguments to this enum variant are incorrect + | +note: tuple variant defined here error[E0308]: mismatched types --> tests/html_macro/element-fail.rs:37:29 | 37 | html! { }; - | ^^^^^^^^^^^ expected `bool`, found enum `Option` + | ------------------------^^^^^^^^^^^------ + | | | + | | expected `bool`, found enum `Option` + | arguments to this enum variant are incorrect | = note: expected type `bool` found enum `Option` +note: tuple variant defined here error[E0308]: mismatched types --> tests/html_macro/element-fail.rs:38:29 | 38 | html! { }; - | ^ expected `bool`, found integer + | ^ + | | + | expected `bool`, found integer + | arguments to this function are incorrect + | +note: function defined here + --> $WORKSPACE/packages/yew/src/utils/mod.rs + | + | pub fn __ensure_type(_: T) {} + | ^^^^^^^^^^^^^ error[E0308]: mismatched types --> tests/html_macro/element-fail.rs:39:30 @@ -399,63 +417,112 @@ error[E0308]: mismatched types --> tests/html_macro/element-fail.rs:40:30 | 40 | html! {