about summary refs log tree commit diff
path: root/tests/ui/methods/supertrait-shadowing/definition-site.rs
blob: 2768a6a6b2717bb62c2185e7de25d7ad6c592c20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![feature(supertrait_item_shadowing)]
#![deny(supertrait_item_shadowing_definition)]

trait SuperSuper {
    fn method();
}

trait Super: SuperSuper {
    fn method();
    //~^ ERROR trait item `method` from `Super` shadows identically named item
}

trait Sub: Super {
    fn method();
    //~^ ERROR trait item `method` from `Sub` shadows identically named item
}

fn main() {}