mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-24 12:03:28 +00:00
32 lines
491 B
Rust
32 lines
491 B
Rust
|
#![deny(clippy::trait_duplication_in_bounds)]
|
||
|
|
||
|
use std::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Sub, SubAssign};
|
||
|
|
||
|
fn bad_foo<T: Clone + Default, Z: Copy>(arg0: T, arg1: Z)
|
||
|
where
|
||
|
T: Clone,
|
||
|
T: Default,
|
||
|
{
|
||
|
unimplemented!();
|
||
|
}
|
||
|
|
||
|
fn good_bar<T: Clone + Default>(arg: T) {
|
||
|
unimplemented!();
|
||
|
}
|
||
|
|
||
|
fn good_foo<T>(arg: T)
|
||
|
where
|
||
|
T: Clone + Default,
|
||
|
{
|
||
|
unimplemented!();
|
||
|
}
|
||
|
|
||
|
fn good_foobar<T: Default>(arg: T)
|
||
|
where
|
||
|
T: Clone,
|
||
|
{
|
||
|
unimplemented!();
|
||
|
}
|
||
|
|
||
|
fn main() {}
|