]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/trait_duplication_in_bounds.rs
Auto merge of #84620 - Dylan-DPC:rollup-wkv97im, r=Dylan-DPC
[rust.git] / src / tools / clippy / tests / ui / trait_duplication_in_bounds.rs
1 #![deny(clippy::trait_duplication_in_bounds)]
2
3 use std::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Sub, SubAssign};
4
5 fn bad_foo<T: Clone + Default, Z: Copy>(arg0: T, arg1: Z)
6 where
7     T: Clone,
8     T: Default,
9 {
10     unimplemented!();
11 }
12
13 fn good_bar<T: Clone + Default>(arg: T) {
14     unimplemented!();
15 }
16
17 fn good_foo<T>(arg: T)
18 where
19     T: Clone + Default,
20 {
21     unimplemented!();
22 }
23
24 fn good_foobar<T: Default>(arg: T)
25 where
26     T: Clone,
27 {
28     unimplemented!();
29 }
30
31 fn main() {}