forked from yewstack/yew
/
html-tag-fail.stderr
247 lines (220 loc) · 9.54 KB
/
html-tag-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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
error: this open tag has no corresponding close tag
--> $DIR/html-tag-fail.rs:6:13
|
6 | html! { <div> };
| ^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: this open tag has no corresponding close tag
--> $DIR/html-tag-fail.rs:7:18
|
7 | html! { <div><div> };
| ^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: this close tag has no corresponding open tag
--> $DIR/html-tag-fail.rs:8:13
|
8 | html! { </div> };
| ^^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: this open tag has no corresponding close tag
--> $DIR/html-tag-fail.rs:9:13
|
9 | html! { <div><div></div> };
| ^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: only one root html element allowed
--> $DIR/html-tag-fail.rs:10:24
|
10 | html! { <div></div><div></div> };
| ^^^^^^^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: this close tag has no corresponding open tag
--> $DIR/html-tag-fail.rs:11:18
|
11 | html! { <div></span> };
| ^^^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: this close tag has no corresponding open tag
--> $DIR/html-tag-fail.rs:12:20
|
12 | html! { <tag-a></tag-b> };
| ^^^^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: this close tag has no corresponding open tag
--> $DIR/html-tag-fail.rs:13:18
|
13 | html! { <div></span></div> };
| ^^^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: only one root html element allowed
--> $DIR/html-tag-fail.rs:14:20
|
14 | html! { <img /></img> };
| ^^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected valid html element
--> $DIR/html-tag-fail.rs:15:18
|
15 | html! { <div>Invalid</div> };
| ^^^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: only one `attr` attribute allowed
--> $DIR/html-tag-fail.rs:17:27
|
17 | html! { <input attr=1 attr=2 /> };
| ^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: only one `value` attribute allowed
--> $DIR/html-tag-fail.rs:18:32
|
18 | html! { <input value="123" value="456" /> };
| ^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: only one `kind` attribute allowed
--> $DIR/html-tag-fail.rs:19:36
|
19 | html! { <input kind="checkbox" kind="submit" /> };
| ^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: only one `checked` attribute allowed
--> $DIR/html-tag-fail.rs:20:33
|
20 | html! { <input checked=true checked=false /> };
| ^^^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: only one `disabled` attribute allowed
--> $DIR/html-tag-fail.rs:21:34
|
21 | html! { <input disabled=true disabled=false /> };
| ^^^^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: only one `selected` attribute allowed
--> $DIR/html-tag-fail.rs:22:35
|
22 | html! { <option selected=true selected=false /> };
| ^^^^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: only one `class` attribute allowed
--> $DIR/html-tag-fail.rs:23:32
|
23 | html! { <div class="first" class="second" /> };
| ^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: only one `ref` attribute allowed
--> $DIR/html-tag-fail.rs:38:27
|
38 | html! { <input ref=() ref=() /> };
| ^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0308]: mismatched types
--> $DIR/html-tag-fail.rs:25:28
|
25 | html! { <input checked=1 /> };
| ^ expected `bool`, found integer
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0308]: mismatched types
--> $DIR/html-tag-fail.rs:26:29
|
26 | html! { <input disabled=1 /> };
| ^ expected `bool`, found integer
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0308]: mismatched types
--> $DIR/html-tag-fail.rs:27:30
|
27 | html! { <option selected=1 /> };
| ^ expected `bool`, found integer
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: `()` doesn't implement `std::fmt::Display`
--> $DIR/html-tag-fail.rs:28:25
|
28 | html! { <input type=() /> };
| ^^ `()` cannot be formatted with the default formatter
|
= help: the trait `std::fmt::Display` is not implemented for `()`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
= note: required because of the requirements on the impl of `std::string::ToString` for `()`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: `()` doesn't implement `std::fmt::Display`
--> $DIR/html-tag-fail.rs:29:26
|
29 | html! { <input value=() /> };
| ^^ `()` cannot be formatted with the default formatter
|
= help: the trait `std::fmt::Display` is not implemented for `()`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
= note: required because of the requirements on the impl of `std::string::ToString` for `()`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `yew::html::Href: std::convert::From<()>` is not satisfied
--> $DIR/html-tag-fail.rs:30:21
|
30 | html! { <a href=() /> };
| ^^ the trait `std::convert::From<()>` is not implemented for `yew::html::Href`
|
= help: the following implementations were found:
<yew::html::Href as std::convert::From<&'a str>>
<yew::html::Href as std::convert::From<std::string::String>>
= note: required because of the requirements on the impl of `std::convert::Into<yew::html::Href>` for `()`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0308]: mismatched types
--> $DIR/html-tag-fail.rs:32:20
|
32 | html! { <input onclick=1 /> };
| ^^^^^^^ expected enum `yew::callback::Callback`, found integer
|
= note: expected enum `yew::callback::Callback<web_sys::features::gen_MouseEvent::MouseEvent>`
found type `{integer}`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0308]: mismatched types
--> $DIR/html-tag-fail.rs:33:20
|
33 | html! { <input onclick=Callback::from(|a: String| ()) /> };
| ^^^^^^^ expected struct `web_sys::features::gen_MouseEvent::MouseEvent`, found struct `std::string::String`
|
= note: expected enum `yew::callback::Callback<web_sys::features::gen_MouseEvent::MouseEvent>`
found enum `yew::callback::Callback<std::string::String>`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0599]: no method named `to_string` found for struct `NotToString` in the current scope
--> $DIR/html-tag-fail.rs:35:27
|
3 | struct NotToString;
| -------------------
| |
| method `to_string` not found for this
| doesn't satisfy `NotToString: std::fmt::Display`
| doesn't satisfy `NotToString: std::string::ToString`
...
35 | html! { <input string=NotToString /> };
| ^^^^^^^^^^^ method not found in `NotToString`
|
= note: the method `to_string` exists but the following trait bounds were not satisfied:
`NotToString: std::fmt::Display`
which is required by `NotToString: std::string::ToString`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0308]: mismatched types
--> $DIR/html-tag-fail.rs:37:24
|
37 | html! { <input ref=() /> };
| ^^ expected struct `yew::html::NodeRef`, found `()`
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)