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() {}