mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 23:24:24 +00:00
31 lines
491 B
Rust
31 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() {}
|