yew
yew copied to clipboard
generic #[hook] function gives `bound is defined in more than one place` warning
Problem code like this
#[hook]
pub fn use_generic<N: PartialEq>(){
}
will emit warning:
warning: bound is defined in more than one place
--> frontend/src/components/shiori.rs:560:20
|
560 | pub fn use_generic<N: PartialEq>(){
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index
.html#multiple_bound_locations
= note: `#[warn(clippy::multiple_bound_locations)]` on by default
see: https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
Environment:
- Yew version: v0.21
- Rust version: nightly
This is one of the default clippy warnings, not cargo check
This is a clippy warning. We should suppress it in the generated code though. I'll be happy to look at any PR suppressing it