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
{{ message }}
Repository navigation
Custom hooks with RPIT no longer compile in Rust 2024 #3774
$ cargo +nightly-2024-12-12 checkerror: lifetime may not live long enough --> src/lib.rs:3:1 |3 | #[hook] | -^^^^^- | | | | | return type of closure `impl Sized` contains a lifetime `'2` | let's call the lifetime of this reference `'1` | returning this value requires that `'1` must outlive `'2` | = note: this error originates in the attribute macro `hook` (in Nightly builds, run with -Z macro-backtrace for more info)
Expected behavior
Successful compilation as in Rust 2021
Screenshots
If applicable, add screenshots to help explain your problem.
Environment:
Yew version: 0.21.0
Rust version: nightly-2024-12-12
Target, if relevant: N/A
Build tool, if relevant: N/A
OS, if relevant: N/A
Browser and version, if relevant: N/A
Questionnaire
I'm interested in fixing this myself but don't know where to start
I would like to fix and I have a solution
I don't have time to fix this right now, but maybe later
Activity
kawadakk commentedon Dec 17, 2024
A possible work-around is to manually list all type and lifetime parameters in scope by
+ use<...>. Example: