summaryrefslogtreecommitdiffstats
path: root/src/test/ui/resolve/point-at-type-parameter-shadowing-another-type.rs
blob: bd496875e80b948711613fd4661f344028e45700 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
trait Foo<T> {
    fn foo(&self, name: T) -> usize;
}

struct Bar {
    baz: Baz,
}

struct Baz {
    num: usize,
}

impl<Baz> Foo<Baz> for Bar {
    fn foo(&self, _name: Baz) -> usize {
        match self.baz {
            Baz { num } => num, //~ ERROR expected struct, variant or union type, found type parameter `Baz`
        }
    }
}

fn main() {}