Skip to content

Commit

Permalink
Ignore trait_duplication_in_bounds clippy false positives
Browse files Browse the repository at this point in the history
rust-lang/rust-clippy#8757

    error: this trait bound is already specified in the where clause
      --> tests/regression/issue845.rs:13:8
       |
    13 |     T: TryFrom<u64> + TryFrom<i64> + FromStr,
       |        ^^^^^^^^^^^^
       |
       = note: `-D clippy::trait-duplication-in-bounds` implied by `-D clippy::pedantic`
       = help: consider removing this trait bound
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trait_duplication_in_bounds

    error: this trait bound is already specified in the where clause
      --> tests/regression/issue845.rs:14:33
       |
    14 |     <T as TryFrom<u64>>::Error: Display,
       |                                 ^^^^^^^
       |
       = help: consider removing this trait bound
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trait_duplication_in_bounds

    error: this trait bound is already specified in the where clause
      --> tests/regression/issue845.rs:49:8
       |
    49 |     T: TryFrom<u64> + TryFrom<i64> + FromStr,
       |        ^^^^^^^^^^^^
       |
       = help: consider removing this trait bound
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trait_duplication_in_bounds

    error: this trait bound is already specified in the where clause
      --> tests/regression/issue845.rs:50:33
       |
    50 |     <T as TryFrom<u64>>::Error: Display,
       |                                 ^^^^^^^
       |
       = help: consider removing this trait bound
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trait_duplication_in_bounds
  • Loading branch information
dtolnay committed May 1, 2022
1 parent 048a64c commit c0f9343
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/regression/issue845.rs
@@ -1,3 +1,5 @@
#![allow(clippy::trait_duplication_in_bounds)] // https://github.com/rust-lang/rust-clippy/issues/8757

use serde::{Deserialize, Deserializer};
use std::convert::TryFrom;
use std::fmt::{self, Display};
Expand Down

0 comments on commit c0f9343

Please sign in to comment.