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

struct Bar;

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

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

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