1 #![deny(clippy::trait_duplication_in_bounds)]
3 use std::collections::BTreeMap;
4 use std::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Sub, SubAssign};
6 fn bad_foo<T: Clone + Default, Z: Copy>(arg0: T, arg1: Z)
14 fn good_bar<T: Clone + Default>(arg: T) {
18 fn good_foo<T>(arg: T)
25 fn good_foobar<T: Default>(arg: T)
49 Self: Default + Clone;
52 trait BadTrait: Default + Clone {
55 Self: Default + Clone;
64 #[derive(Default, Clone)]
68 // this should not warn
73 // this should not warn
78 trait Iter: Iterator {
79 fn into_group_btreemap<K, V>(self) -> BTreeMap<K, Vec<V>>
81 Self: Iterator<Item = (K, V)> + Sized,
90 trait FooIter: Iterator<Item = Foo> {
93 Self: Iterator<Item = Foo>,