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
error[E0310]: the associated type `<impl leptos::IntoView as leptos::prelude::AddAnyAttr>::Output<(Class<&str>,)>` may not live long enough
--> cmd/ui/src/components/propulsion/on_buttons.rs:135:5
|
135 | / view! {
136 | | <Show when=move || show_on_button() || show_start_button() || show_throttle_warning()>
137 | | <Show when=show_hydraulic_pump_button>
138 | | <div class=classes!(css::hydraulicPump, "text-center")>
... |
211 | | </Show>
212 | | }
| | ^
| | |
| |_________the associated type `<impl leptos::IntoView as leptos::prelude::AddAnyAttr>::Output<(Class<&str>,)>` must be valid for the static lifetime...
| ...so that the type `<impl leptos::IntoView as leptos::prelude::AddAnyAttr>::Output<(Class<&str>,)>` will meet its required lifetime bounds
|
= help: consider adding an explicit lifetime bound `<impl leptos::IntoView as leptos::prelude::AddAnyAttr>::Output<(Class<&str>,)>: 'static`...
= note: this error originates in the macro `view` (in Nightly builds, run with -Z macro-backtrace for more info)
The text was updated successfully, but these errors were encountered:
My assumption would be that at least one of these values (css::tripped, for example) is a borrowed, not an owned, type, and needs to be owned. For example, if css::tripped is &str, then it needs to be either a String or &'static str, etc.
If you provide a reproducible example (i.e., fill in the missing parts in the examples above), I'm happy to look at it in more depth.
The following markup works fine:
But when moving the css::tripped after the
{..}
operator on the second<Icon/>
tag like:Then the markup generates this error:
The text was updated successfully, but these errors were encountered: