]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/field-has-method.rs
Rollup merge of #107559 - WaffleLapkin:is_it_2015¿, r=davidtwco
[rust.git] / tests / ui / suggestions / field-has-method.rs
1 struct Kind;
2
3 struct Ty {
4     kind: Kind,
5 }
6
7 impl Ty {
8     fn kind(&self) -> Kind {
9         todo!()
10     }
11 }
12
13 struct InferOk<T> {
14     value: T,
15     predicates: Vec<()>,
16 }
17
18 fn foo(i: InferOk<Ty>) {
19     let k = i.kind();
20     //~^ no method named `kind` found for struct `InferOk` in the current scope
21 }
22
23 fn main() {}