Open zroug opened 4 weeks ago
A PR for Option 3 is welcome (passing through a user-provided attribute), but it probably shouldn't be special-cased; the component
macro should likely just pass through most or all attributes to the __NameOfComponent
function that is used to improve rust-analyzer support.
Describe the bug
Leptos 0.7.0-rc0
#[component]
attribute is incompatible with theclippy::must_use_candidate
lint.Leptos Dependencies
To Reproduce Steps to reproduce the behavior:
clippy::must_use_candidate
lint.#[component]
attribute.Expected behavior There should be no Clippy warning. There are at least three ways to achieve this:
#[must_use]
attribute to the component function. (My preferred option.)#[allow(clippy::must_use_candidate)]
to the component function.#[must_use]
attribute to the generated component function if the user adds the attribute manually.