mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
17 lines
286 B
Rust
17 lines
286 B
Rust
|
// This error is an E0609 and *not* an E0615 because the fact that the method exists is not
|
||
|
// relevant.
|
||
|
mod foo {
|
||
|
pub struct Foo {
|
||
|
x: u32,
|
||
|
}
|
||
|
|
||
|
impl Foo {
|
||
|
fn method(&self) {}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
fn main() {
|
||
|
let f = foo::Foo { x: 0 };
|
||
|
f.method; //~ ERROR E0609
|
||
|
}
|