Open landaire opened 2 months ago
This is invalid Rust syntax of course, so can't ever be parsed by a proc macro, since proc macros need to consist of a stream of valid tokens. I can look into whether the panic comes from rstml or from leptos, but either way you should just use a regular Rust string here with the JavaScript inside it.
Yeah for what it's worth I realize that what I was doing is not valid, but I was surprised that I got what seemed to be a valid error (error: character literal may only contain one codepoint
) then a panic. This isn't something that I see as a high-priority at all but might be a UX improvement.
Describe the bug
An invalid character literal in
view!
causes the proc macro to fail an assertion and panic:Leptos Dependencies
Please copy and paste the Leptos dependencies and features from your
Cargo.toml
.For example:
To Reproduce
The following causes the
view!
proc macro to panic:Expected behavior
The proc macro should fail gracefully.