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(); }