fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1#![warn(clippy::implied_bounds_in_impls)] 2 3use std::fmt::Debug; 4use std::ops::*; 5 6fn gen() -> impl PartialOrd + Debug {} 7 8struct Bar {} 9trait Foo<T = Self> {} 10trait FooNested<T = Option<Self>> {} 11impl Foo for Bar {} 12impl FooNested for Bar {} 13 14fn foo() -> impl Foo + FooNested { 15 Bar {} 16} 17 18fn test_impl_ops() -> impl Add + Sub + Mul + Div { 19 1 20} 21fn test_impl_assign_ops() -> impl AddAssign + SubAssign + MulAssign + DivAssign { 22 1 23} 24 25fn main() {}