mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
24 lines
314 B
Rust
24 lines
314 B
Rust
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() {}
|