yew/packages/yew-macro/tests/html_macro/html-if-fail.stderr
Cecile Tonglet 3858aededd
Add the ability to add child nodes conditionally in html! (#1609)
* Initial commit

Forked at: 66d506e13329a06f7dce0b55a9427972b8aad3ff
Parent branch: origin/master

* Add the ability to add child nodes conditionally in html!

* WIP

Forked at: 66d506e13329a06f7dce0b55a9427972b8aad3ff
Parent branch: origin/master

* CLEANUP

Forked at: 66d506e13329a06f7dce0b55a9427972b8aad3ff
Parent branch: origin/master

* Experiment

* Failing test

* More tests

* More tests

* Add new HtmlIterable with syntax `for {...}` instead of `{for ...}`

* Remove HtmlIf from HtmlRoot (already done in HtmlTree)

* WIP

* WIP

* WIP

* WIP

* Revert

* CLEANUP

* WIP

* CLEANUP

* Remove IterableNew

* Renamed HtmlBranch to HtmlRootBraced and moved to mod.rs

* Update yew-macro/tests/html_macro/html-if-pass.rs

Co-authored-by: Simon <simon@siku2.io>

* Suggestion

* Oops

* Added ToNodeIterator to HtmlIf

* Improve error spans

* More html!()

* Move tests to not use browser

* Multiple children in if-expr

* Clippy fix

* Clippy fix again

* Re-trigger CI

* Apply suggestions from code review

Co-authored-by: Simon <simon@siku2.io>

* Replacing ParseResult by syn::Result everywhere

* Remove unnecessary &mut

* Attempt to add test on ToNodeIterator

* Clippy fixes

* Still works for some reason

* Revert "Attempt to add test on ToNodeIterator"

This reverts commit 75b1a85c28df36ad8bf61344eef56e06667da3b6.

* fix CI

* add docs on website

* Apply suggestions from code review

Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk>

* apparently I can't hide lines on website

* update stderr file

* will this work?

* fix bug where conditions can't be expressions

* better error message

* clippy & fmt

Co-authored-by: Simon <simon@siku2.io>
Co-authored-by: Hamza <muhammadhamza1311@gmail.com>
Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk>
2021-11-22 20:13:03 +02:00

36 lines
1009 B
Plaintext

error: missing condition for `if` expression
--> tests/html_macro/html-if-fail.rs:4:16
|
4 | html! { if {} };
| ^^
error: expected block or `if` after `else`
--> tests/html_macro/html-if-fail.rs:6:24
|
6 | html! { if true {} else };
| ^^^^
error: missing condition for `if` expression
--> tests/html_macro/html-if-fail.rs:7:32
|
7 | html! { if true {} else if {} };
| ^^
error: expected block or `if` after `else`
--> tests/html_macro/html-if-fail.rs:8:40
|
8 | html! { if true {} else if true {} else };
| ^^^^
error: expected block or `if` after `else`
--> tests/html_macro/html-if-fail.rs:9:40
|
9 | html! { if true {} else if true {} else };
| ^^^^
error[E0308]: mismatched types
--> tests/html_macro/html-if-fail.rs:5:16
|
5 | html! { if 42 {} };
| ^^ expected `bool`, found integer