2025-08-20 20:25:08 +09:00

181 lines
8.2 KiB
Plaintext

error: unexpected end of input, expected an expression
--> tests/derive_props/fail.rs:56:19
|
56 | #[prop_or()]
| ^
error: cannot find attribute `props` in this scope
--> tests/derive_props/fail.rs:22:11
|
22 | #[props(default)]
| ^^^^^
error[E0425]: cannot find value `foo` in this scope
--> tests/derive_props/fail.rs:86:24
|
86 | #[prop_or_else(foo)]
| ^^^ not found in this scope
|
note: these functions exist but are inaccessible
--> tests/derive_props/fail.rs:100:5
|
100 | fn foo(bar: i32) -> String {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ `crate::t9::foo`: not accessible
...
114 | fn foo() -> i32 {
| ^^^^^^^^^^^^^^^ `crate::t10::foo`: not accessible
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`
|
note: required by a bound in `Option::<T>::unwrap_or_default`
--> $RUST/core/src/option.rs
= 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)]
9 | struct Value;
|
error[E0369]: binary operation `==` cannot be applied to type `Value`
--> tests/derive_props/fail.rs:13:9
|
9 | #[derive(Clone, Properties, PartialEq)]
| --------- in this derive macro expansion
...
13 | value: Value,
| ^^^^^^^^^^^^
|
note: an implementation of `PartialEq` might be missing for `Value`
--> tests/derive_props/fail.rs:8:5
|
8 | struct Value;
| ^^^^^^^^^^^^ 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)]
9 | struct Value;
|
error[E0277]: not all required properties have been provided
--> tests/derive_props/fail.rs:35:24
|
35 | ::yew::props!{ Props { } };
| ^^^^^ missing required properties for this component
|
= help: the trait `HasProp<t3::_Props::value, _>` is not implemented for `AssertAllProps`
= help: the following other types implement trait `HasProp<P, How>`:
`CheckChildrenPropsAll<B>` implements `HasProp<P, &dyn HasProp<P, How>>`
`CheckContextProviderPropsAll<B>` implements `HasProp<P, &dyn HasProp<P, How>>`
`HasContextProviderPropschildren<B>` implements `HasProp<P, &dyn HasProp<P, How>>`
`HasContextProviderPropschildren<B>` implements `HasProp<children, HasContextProviderPropschildren<B>>`
`HasContextProviderPropscontext<B>` implements `HasProp<P, &dyn HasProp<P, How>>`
`HasContextProviderPropscontext<B>` implements `HasProp<yew::context::_ContextProviderProps::context, HasContextProviderPropscontext<B>>`
`suspense::component::CheckSuspensePropsAll<B>` implements `HasProp<P, &dyn HasProp<P, How>>`
`t10::CheckPropsAll<B>` implements `HasProp<P, &dyn HasProp<P, How>>`
and $N others
note: required for `t3::CheckPropsAll<AssertAllProps>` to implement `HasAllProps<t3::Props, (_,)>`
--> tests/derive_props/fail.rs:29:21
|
29 | #[derive(Clone, Properties, PartialEq)]
| ^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
= note: required for `AssertAllProps` to implement `AllPropsFor<t3::PropsBuilder, (_,)>`
note: required by a bound in `html::component::properties::__macro::PreBuild::<Token, B>::build`
--> $WORKSPACE/packages/yew/src/html/component/properties.rs
|
| pub fn build<How>(self) -> B::Output
| ----- required by a bound in this associated function
| where
| Token: AllPropsFor<B, How>,
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `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]: not all required properties have been provided
--> tests/derive_props/fail.rs:47:24
|
47 | ::yew::props!{ Props { } };
| ^^^^^ missing required properties for this component
|
= help: the trait `HasProp<t4::_Props::value, _>` is not implemented for `AssertAllProps`
= help: the following other types implement trait `HasProp<P, How>`:
`CheckChildrenPropsAll<B>` implements `HasProp<P, &dyn HasProp<P, How>>`
`CheckContextProviderPropsAll<B>` implements `HasProp<P, &dyn HasProp<P, How>>`
`HasContextProviderPropschildren<B>` implements `HasProp<P, &dyn HasProp<P, How>>`
`HasContextProviderPropschildren<B>` implements `HasProp<children, HasContextProviderPropschildren<B>>`
`HasContextProviderPropscontext<B>` implements `HasProp<P, &dyn HasProp<P, How>>`
`HasContextProviderPropscontext<B>` implements `HasProp<yew::context::_ContextProviderProps::context, HasContextProviderPropscontext<B>>`
`suspense::component::CheckSuspensePropsAll<B>` implements `HasProp<P, &dyn HasProp<P, How>>`
`t10::CheckPropsAll<B>` implements `HasProp<P, &dyn HasProp<P, How>>`
and $N others
note: required for `t4::CheckPropsAll<AssertAllProps>` to implement `HasAllProps<t4::Props, (_,)>`
--> tests/derive_props/fail.rs:41:21
|
41 | #[derive(Clone, Properties, PartialEq)]
| ^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
= note: required for `AssertAllProps` to implement `AllPropsFor<t4::PropsBuilder, (_,)>`
note: required by a bound in `html::component::properties::__macro::PreBuild::<Token, B>::build`
--> $WORKSPACE/packages/yew/src/html/component/properties.rs
|
| pub fn build<How>(self) -> B::Output
| ----- required by a bound in this associated function
| where
| Token: AllPropsFor<B, How>,
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `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:66:19
|
66 | #[prop_or(123)]
| ^^^- help: try using a conversion method: `.to_string()`
| |
| expected `String`, found integer
| arguments to this function are incorrect
|
note: method defined here
--> $RUST/core/src/option.rs
error[E0277]: expected a `FnOnce()` closure, found `{integer}`
--> tests/derive_props/fail.rs:76:24
|
76 | #[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`
--> $RUST/core/src/option.rs
error[E0593]: function is expected to take 0 arguments, but it takes 1 argument
--> tests/derive_props/fail.rs:96:24
|
96 | #[prop_or_else(foo)]
| ^^^ expected function that takes 0 arguments
...
100 | fn foo(bar: i32) -> String {
| -------------------------- takes 1 argument
|
note: required by a bound in `Option::<T>::unwrap_or_else`
--> $RUST/core/src/option.rs
error[E0271]: expected `foo` to be a fn item that returns `String`, but it returns `i32`
--> tests/derive_props/fail.rs:110:24
|
110 | #[prop_or_else(foo)]
| ^^^ expected `String`, found `i32`
|
note: required by a bound in `Option::<T>::unwrap_or_else`
--> $RUST/core/src/option.rs
warning: unused variable: `bar`
--> tests/derive_props/fail.rs:100:12
|
100 | fn foo(bar: i32) -> String {
| ^^^ help: if this is intentional, prefix it with an underscore: `_bar`
|
= note: `#[warn(unused_variables)]` on by default