rust/tests/ui/suggestions/field-has-method.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
314 B
Rust
Raw Normal View History

2022-04-24 18:45:39 -05:00
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() {}