Skip to content
New issue

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

generic #[hook] function gives bound is defined in more than one place warning #3708

Open
Madoshakalaka opened this issue Aug 10, 2024 · 2 comments
Labels
A-yew-macro Area: The yew-macro crate

Comments

@Madoshakalaka
Copy link
Contributor

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
@Madoshakalaka
Copy link
Contributor Author

This is one of the default clippy warnings, not cargo check

@ranile
Copy link
Member

ranile commented Aug 12, 2024

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

@ranile ranile added A-yew-macro Area: The yew-macro crate and removed bug labels Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-yew-macro Area: The yew-macro crate
Projects
None yet
Development

No branches or pull requests

2 participants