Skip to content

Commit

Permalink
Update stderr files
Browse files Browse the repository at this point in the history
  • Loading branch information
cecton committed Jul 29, 2023
1 parent e1f3e42 commit 7f0288d
Show file tree
Hide file tree
Showing 11 changed files with 498 additions and 265 deletions.
138 changes: 81 additions & 57 deletions packages/yew-macro/tests/classes_macro/classes-fail.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -11,77 +11,93 @@ 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:
<Classes as From<&'static str>>
<Classes as From<&Option<T>>>
<Classes as From<&String>>
<Classes as From<&[T]>>
and 6 others
= note: required because of the requirements on the impl of `Into<Classes>` 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<T>`:
<Classes as From<&'static str>>
<Classes as From<&Option<T>>>
<Classes as From<&String>>
<Classes as From<&[T]>>
<Classes as From<&implicit_clone::unsync::IString>>
<Classes as From<Cow<'static, str>>>
<Classes as From<Option<T>>>
<Classes as From<String>>
and $N others
= note: required because of the requirements on the impl of `Into<Classes>` for `{integer}`
note: required by a bound in `Classes::push`
--> $WORKSPACE/packages/yew/src/html/classes.rs
|
| pub fn push<T: Into<Self>>(&mut self, class: T) {
| ^^^^^^^^^^ required by this bound in `Classes::push`
--> $WORKSPACE/packages/yew/src/html/classes.rs
|
| pub fn push<T: Into<Self>>(&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:
<Classes as From<&'static str>>
<Classes as From<&Option<T>>>
<Classes as From<&String>>
<Classes as From<&[T]>>
and 6 others
= note: required because of the requirements on the impl of `Into<Classes>` 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<T>`:
<Classes as From<&'static str>>
<Classes as From<&Option<T>>>
<Classes as From<&String>>
<Classes as From<&[T]>>
<Classes as From<&implicit_clone::unsync::IString>>
<Classes as From<Cow<'static, str>>>
<Classes as From<Option<T>>>
<Classes as From<String>>
and $N others
= note: required because of the requirements on the impl of `Into<Classes>` for `{float}`
note: required by a bound in `Classes::push`
--> $WORKSPACE/packages/yew/src/html/classes.rs
|
| pub fn push<T: Into<Self>>(&mut self, class: T) {
| ^^^^^^^^^^ required by this bound in `Classes::push`
--> $WORKSPACE/packages/yew/src/html/classes.rs
|
| pub fn push<T: Into<Self>>(&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:
<Classes as From<&'static str>>
<Classes as From<&Option<T>>>
<Classes as From<&String>>
<Classes as From<&[T]>>
and 6 others
= note: required because of the requirements on the impl of `Into<Classes>` for `{integer}`
= note: required because of the requirements on the impl of `From<Vec<{integer}>>` for `Classes`
= note: 1 redundant requirement hidden
= note: required because of the requirements on the impl of `Into<Classes>` 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<T>`:
<Classes as From<&'static str>>
<Classes as From<&Option<T>>>
<Classes as From<&String>>
<Classes as From<&[T]>>
<Classes as From<&implicit_clone::unsync::IString>>
<Classes as From<Cow<'static, str>>>
<Classes as From<Option<T>>>
<Classes as From<String>>
and $N others
= note: required because of the requirements on the impl of `Into<Classes>` for `{integer}`
= note: required because of the requirements on the impl of `From<Vec<{integer}>>` for `Classes`
= note: 1 redundant requirement hidden
= note: required because of the requirements on the impl of `Into<Classes>` for `Vec<{integer}>`
note: required by a bound in `Classes::push`
--> $WORKSPACE/packages/yew/src/html/classes.rs
|
| pub fn push<T: Into<Self>>(&mut self, class: T) {
| ^^^^^^^^^^ required by this bound in `Classes::push`
--> $WORKSPACE/packages/yew/src/html/classes.rs
|
| pub fn push<T: Into<Self>>(&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
|
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<T>`:
<Classes as From<&'static str>>
<Classes as From<&Option<T>>>
<Classes as From<&String>>
<Classes as From<&[T]>>
and 6 others
<Classes as From<&implicit_clone::unsync::IString>>
<Classes as From<Cow<'static, str>>>
<Classes as From<Option<T>>>
<Classes as From<String>>
and $N others
= note: required because of the requirements on the impl of `Into<Classes>` for `{integer}`
= note: required because of the requirements on the impl of `From<Option<{integer}>>` for `Classes`
= note: 1 redundant requirement hidden
Expand All @@ -98,12 +114,16 @@ error[E0277]: the trait bound `Classes: From<u32>` is not satisfied
14 | classes!(none);
| ^^^^ the trait `From<u32>` is not implemented for `Classes`
|
= help: the following implementations were found:
= help: the following other types implement trait `From<T>`:
<Classes as From<&'static str>>
<Classes as From<&Option<T>>>
<Classes as From<&String>>
<Classes as From<&[T]>>
and 6 others
<Classes as From<&implicit_clone::unsync::IString>>
<Classes as From<Cow<'static, str>>>
<Classes as From<Option<T>>>
<Classes as From<String>>
and $N others
= note: required because of the requirements on the impl of `Into<Classes>` for `u32`
= note: required because of the requirements on the impl of `From<Option<u32>>` for `Classes`
= note: 1 redundant requirement hidden
Expand All @@ -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<T>`:
<Classes as From<&'static str>>
<Classes as From<&Option<T>>>
<Classes as From<&String>>
<Classes as From<&[T]>>
and 6 others
<Classes as From<&implicit_clone::unsync::IString>>
<Classes as From<Cow<'static, str>>>
<Classes as From<Option<T>>>
<Classes as From<String>>
and $N others
= note: required because of the requirements on the impl of `Into<Classes>` for `{integer}`
note: required by a bound in `Classes::push`
--> $WORKSPACE/packages/yew/src/html/classes.rs
Expand Down
112 changes: 65 additions & 47 deletions packages/yew-macro/tests/derive_props/fail.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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<t3::_Props::value, _>` is not satisfied
--> tests/derive_props/fail.rs:35:24
|
35 | ::yew::props!{ Props { } };
| ^^^^^ the trait `HasProp<t3::_Props::value, _>` is not implemented for `AssertAllProps`
|
note: required because of the requirements on the impl of `HasAllProps<t3::Props, (_,)>` for `t3::CheckPropsAll<AssertAllProps>`
--> tests/derive_props/fail.rs:29:21
|
29 | #[derive(Clone, Properties, PartialEq)]
| ^^^^^^^^^^
= note: required because of the requirements on the impl of `AllPropsFor<t3::PropsBuilder, (_,)>` for `AssertAllProps`
note: required by a bound in `html::component::properties::__macro::PreBuild::<Token, B>::build`
--> $WORKSPACE/packages/yew/src/html/component/properties.rs
|
| Token: AllPropsFor<B, How>,
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `html::component::properties::__macro::PreBuild::<Token, B>::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::<T>::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
Expand All @@ -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)]`
|
Expand All @@ -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<t3::_Props::value, _>` is not satisfied
--> tests/derive_props/fail.rs:35:24
|
35 | ::yew::props!{ Props { } };
| ^^^^^ the trait `HasProp<t3::_Props::value, _>` is not implemented for `AssertAllProps`
|
= help: the following other types implement trait `HasProp<P, How>`:
<CheckChildrenPropsAll<B> as HasProp<P, &dyn HasProp<P, How>>>
<CheckContextProviderPropsAll<B> as HasProp<P, &dyn HasProp<P, How>>>
<HasContextProviderPropschildren<B> as HasProp<P, &dyn HasProp<P, How>>>
<HasContextProviderPropschildren<B> as HasProp<children, HasContextProviderPropschildren<B>>>
<HasContextProviderPropscontext<B> as HasProp<P, &dyn HasProp<P, How>>>
<HasContextProviderPropscontext<B> as HasProp<yew::context::_ContextProviderProps::context, HasContextProviderPropscontext<B>>>
<suspense::component::CheckSuspensePropsAll<B> as HasProp<P, &dyn HasProp<P, How>>>
<t10::CheckPropsAll<B> as HasProp<P, &dyn HasProp<P, How>>>
and $N others
note: required because of the requirements on the impl of `HasAllProps<t3::Props, (_,)>` for `t3::CheckPropsAll<AssertAllProps>`
--> tests/derive_props/fail.rs:29:21
|
29 | #[derive(Clone, Properties, PartialEq)]
| ^^^^^^^^^^
= note: required because of the requirements on the impl of `AllPropsFor<t3::PropsBuilder, (_,)>` for `AssertAllProps`
note: required by a bound in `html::component::properties::__macro::PreBuild::<Token, B>::build`
--> $WORKSPACE/packages/yew/src/html/component/properties.rs
|
| Token: AllPropsFor<B, How>,
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `html::component::properties::__macro::PreBuild::<Token, B>::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())]
Expand All @@ -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::<T>::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::<T>::unwrap_or_else`

error[E0271]: type mismatch resolving `<fn() -> 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::<T>::unwrap_or_else`
Original file line number Diff line number Diff line change
Expand Up @@ -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, RenderError>
VNode
= note: this error originates in the attribute macro `function_component` (in Nightly builds, run with -Z macro-backtrace for more info)
Loading

0 comments on commit 7f0288d

Please sign in to comment.