blob: 1dff29f1dac5d68a6c5a7e357863577266b8378e [file]
#![feature(no_core)]
#![no_core]
#![feature(lang_items)]
#[lang = "sized"]
pub trait Sized {}
struct Foo<T>(T);
impl<X> Foo<X> {
fn new(a: X) -> Self {
// { dg-warning "associated function is never used" "" { target *-*-* } .-1 }
Self(a)
}
fn test(self) -> X {
self.0
}
}
fn main() {
let a;
a = Foo(123);
let b = a.test();
// { dg-warning "unused name" "" { target *-*-* } .-1 }
}