You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The relevant code is pretty old, but the problem was only revealed when I did an update recently. I suspect that the migration away from proc_macro_hack or migration to edition 2021 changed this behavior
The following code no longer compiles at some point
fnfoo(){let element = ("bar","baz");let _:DOMTree<String> = html!(<div>{text!("{}", element.0)}</div>);}
The error is
error[E0609]: no field `0` on type `typed_html::elements::div<_>`
--> src\extract\gen_item.rs:455:62
|
455 | let _: DOMTree<String> = html!(<div>{text!("{}", element.0)}</div>);
| ^ unknown field
|
= note: available fields are: `attrs`, `data_attributes`, `events`, `children`
For more information about this error, try `rustc --explain E0609`.
However, simply renaming the variable solves the problem
It looks like the first piece of code uses the leaked macro internal variable.
PS: I know this repo isn't actively maintained, and I am fine with this issue not being resolved soon. Just want to open as a reminder (maybe for myself if I get some time to fix it)
The text was updated successfully, but these errors were encountered:
The relevant code is pretty old, but the problem was only revealed when I did an update recently. I suspect that the migration away from proc_macro_hack or migration to edition 2021 changed this behavior
The following code no longer compiles at some point
The error is
However, simply renaming the variable solves the problem
It looks like the first piece of code uses the leaked macro internal variable.
PS: I know this repo isn't actively maintained, and I am fine with this issue not being resolved soon. Just want to open as a reminder (maybe for myself if I get some time to fix it)
The text was updated successfully, but these errors were encountered: