We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug
The following code used to work in 0.6.10 but it no longer compiles in 0.6.11:
#[component] pub fn App() -> impl IntoView { view! { <ContextMenu entries=&vec![1, 2, 3] /> } } #[component] pub fn ContextMenu<'a>(entries: &'a [i32]) -> impl IntoView { todo!() }
It fails with:
temporary value is freed at the end of this statement creates a temporary value which is freed while still in use
The issue was introduced in 36b2f91#diff-6f48ef5e16ec5da899bcfd306b73e8399beabcbb88d57ab0b1b33d663b2ec179L193
Basically, the macro used to generate code like this:
{ ::leptos::component_view(&ContextMenu, ::leptos::component_props_builder(&ContextMenu).entries(#[allow(unused_braces)] { &vec![1, 2, 3] }).build()) }
and then changed to this:
let props = ::leptos::component_props_builder(&ContextMenu).entries(#[allow(unused_braces)] { &vec![1, 2, 3] }); #[allow(clippy::let_unit_value, clippy::unit_arg)] let props = props.build(); #[allow(unreachable_code)] ::leptos::component_view(#[allow(clippy::needless_borrows_for_generic_args)] &ContextMenu, props)
The text was updated successfully, but these errors were encountered:
fix: allow temporaries as props (closes #2541)
7dae9bb
3760ced
No branches or pull requests
Describe the bug
The following code used to work in 0.6.10 but it no longer compiles in 0.6.11:
It fails with:
The issue was introduced in 36b2f91#diff-6f48ef5e16ec5da899bcfd306b73e8399beabcbb88d57ab0b1b33d663b2ec179L193
Basically, the macro used to generate code like this:
and then changed to this:
The text was updated successfully, but these errors were encountered: