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

trait Foo {
    fn foo(&self) {} // { dg-warning "unused name" }
}

struct Bar;

pub fn bar() {
    impl Foo for Bar {}
}

fn main() {
    Bar.foo();
}