forked from yewstack/yew
-
Notifications
You must be signed in to change notification settings - Fork 0
/
generic-props-fail.stderr
79 lines (74 loc) · 3.64 KB
/
generic-props-fail.stderr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
error[E0412]: cannot find type `INVALID` in this scope
--> tests/function_component_attr/generic-props-fail.rs:25:19
|
20 | fn compile_fail() {
| - help: you might be missing a type parameter: `<INVALID>`
...
25 | html! { <Comp<INVALID> /> };
| ^^^^^^^ not found in this scope
error[E0599]: no method named `build` found for struct `PropsBuilder<PropsBuilderStep_missing_required_prop_a>` in the current scope
--> tests/function_component_attr/generic-props-fail.rs:22:14
|
3 | #[derive(Clone, Properties, PartialEq)]
| ---------- method `build` not found for this
...
22 | html! { <Comp<Props> /> };
| ^^^^ method not found in `PropsBuilder<PropsBuilderStep_missing_required_prop_a>`
|
= note: the method was found for
- `PropsBuilder<PropsBuilderStepPropsBuilder>`
error[E0277]: the trait bound `FunctionComponent<CompFunctionProvider<MissingTypeBounds>>: BaseComponent` is not satisfied
--> tests/function_component_attr/generic-props-fail.rs:27:14
|
27 | html! { <Comp<MissingTypeBounds> /> };
| ^^^^ the trait `BaseComponent` is not implemented for `FunctionComponent<CompFunctionProvider<MissingTypeBounds>>`
|
= help: the following implementations were found:
<FunctionComponent<T> as BaseComponent>
error[E0599]: the function or associated item `new` exists for struct `VChild<FunctionComponent<CompFunctionProvider<MissingTypeBounds>>>`, but its trait bounds were not satisfied
--> tests/function_component_attr/generic-props-fail.rs:27:14
|
27 | html! { <Comp<MissingTypeBounds> /> };
| ^^^^ function or associated item cannot be called on `VChild<FunctionComponent<CompFunctionProvider<MissingTypeBounds>>>` due to unsatisfied trait bounds
|
::: $WORKSPACE/packages/yew/src/functional/mod.rs
|
| pub struct FunctionComponent<T: FunctionProvider + 'static> {
| ----------------------------------------------------------- doesn't satisfy `_: BaseComponent`
|
= note: the following trait bounds were not satisfied:
`FunctionComponent<CompFunctionProvider<MissingTypeBounds>>: BaseComponent`
error[E0277]: the trait bound `MissingTypeBounds: yew::Properties` is not satisfied
--> tests/function_component_attr/generic-props-fail.rs:27:14
|
27 | html! { <Comp<MissingTypeBounds> /> };
| ^^^^ the trait `yew::Properties` is not implemented for `MissingTypeBounds`
|
note: required because of the requirements on the impl of `FunctionProvider` for `CompFunctionProvider<MissingTypeBounds>`
--> tests/function_component_attr/generic-props-fail.rs:8:1
|
8 | #[function_component(Comp)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `FunctionComponent`
--> $WORKSPACE/packages/yew/src/functional/mod.rs
|
| pub struct FunctionComponent<T: FunctionProvider + 'static> {
| ^^^^^^^^^^^^^^^^ required by this bound in `FunctionComponent`
= note: this error originates in the attribute macro `function_component` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0107]: missing generics for type alias `Comp`
--> tests/function_component_attr/generic-props-fail.rs:30:14
|
30 | html! { <Comp /> };
| ^^^^ expected 1 generic argument
|
note: type alias defined here, with 1 generic parameter: `P`
--> tests/function_component_attr/generic-props-fail.rs:8:22
|
8 | #[function_component(Comp)]
| ^^^^
9 | fn comp<P>(_props: &P) -> Html
| -
help: add missing generic argument
|
30 | html! { <Comp<P> /> };
| ~~~~~~~