summaryrefslogtreecommitdiffstats
path: root/src/test/ui/suggestions/field-has-method.rs
blob: 980000151e2f7f4ea468ef17e246a7523e998539 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
struct Kind;

struct Ty {
    kind: Kind,
}

impl Ty {
    fn kind(&self) -> Kind {
        todo!()
    }
}

struct InferOk<T> {
    value: T,
    predicates: Vec<()>,
}

fn foo(i: InferOk<Ty>) {
    let k = i.kind();
    //~^ no method named `kind` found for struct `InferOk` in the current scope
}

fn main() {}