summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/crashes/ice-11422.rs
blob: 355ec2480bba4b74ba08cb1614a2c2bf03074a29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#![warn(clippy::implied_bounds_in_impls)]

use std::fmt::Debug;
use std::ops::*;

fn gen() -> impl PartialOrd + PartialEq + Debug {}

struct Bar {}
trait Foo<T = Self> {}
trait FooNested<T = Option<Self>> {}
impl Foo for Bar {}
impl FooNested for Bar {}

fn foo() -> impl Foo + FooNested {
    Bar {}
}

fn test_impl_ops() -> impl Add + Sub + Mul + Div {
    1
}
fn test_impl_assign_ops() -> impl AddAssign + SubAssign + MulAssign + DivAssign {
    1
}

fn main() {}