2018-10-04 07:53:16 -05:00
|
|
|
// compile-pass
|
2018-09-06 07:41:12 -05:00
|
|
|
|
2018-05-12 14:43:42 -05:00
|
|
|
// 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() {}
|