about summary refs log tree commit diff
path: root/tests/ui/feature-gates/feature-gate-supertrait-item-shadowing.rs
blob: 218d2eefeaff7fa2e4ae37809e8c9fa9d9223da8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
trait Sup {
    fn method(&self) {}
}

trait Trait: Sup {
    fn method(&self) {}
}

impl Sup for i32 {}
impl Trait for i32 {}

fn poly<T: Trait>(x: T) {
    x.method();
    //~^ ERROR multiple applicable items in scope
}

fn concrete() {
    1.method();
    //~^ ERROR multiple applicable items in scope
}

fn main() {}