blob: ba800ef5b9f42794a7f5181558ae4b40f9aaa15c [file]
#![feature(no_core)]
#![no_core]
#![feature(lang_items)]
#[lang = "sized"]
trait Sized {}
struct Foo {
// { dg-warning "struct is never constructed" "" { target *-*-* } .-1 }
t: u64,
}
impl Foo {
fn of<T>() -> Foo {
// { dg-warning "associated function is never used" "" { target *-*-* } .-1 }
Foo { t: 14 }
}
}
trait Bar {
fn bar() -> Foo;
}
impl<T> Bar for T {
fn bar() -> Foo {
Foo::of::<T>()
}
}