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

pub trait Foo {
    fn foo();
}

impl Foo for u16 {
    fn foo() {
        // { dg-warning "infinite recursion detected" "" { target *-*-* } .-1 }
        <u16 as Foo>::foo()
    }
}

fn main() {
    <u16>::foo();
}