blob: 4a45988e45d7f9747b68a5467f79d705b2e47925 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// compile-pass
// Tests for nested self-reference which caused a stack overflow.
use std::fmt::Debug;
use std::ops::*;
fn gen() -> impl PartialOrd + PartialEq + Debug { }
struct Bar {}
trait Foo<T = Self> {}
impl Foo for Bar {}
fn foo() -> impl Foo {
Bar {}
}
fn test_impl_ops() -> impl Add + Sub + Mul + Div { 1 }
fn test_impl_assign_ops() -> impl AddAssign + SubAssign + MulAssign + DivAssign { 1 }
fn main() {}
|