aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/issue-2136-2.rs
blob: b25820dadfb525801a06dfc3e253309e2b9eecfa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[lang = "sized"]
pub trait Sized {}

struct S;

impl S {
    fn foo(self) {
        // { dg-warning "infinite recursion detected" "" { target *-*-* } .-1 }
        self.foo();
    }
}

fn main() {
    let a = S;
    a.foo();
}