mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 16:15:03 +00:00
31 lines
530 B
Rust
31 lines
530 B
Rust
// run-rustfix
|
|
|
|
struct A {}
|
|
|
|
impl A {
|
|
fn hello(_a: i32) {}
|
|
fn test(_a: Self, _b: i32) {}
|
|
}
|
|
|
|
struct B<T> {
|
|
_b: T
|
|
}
|
|
impl<T> B<T> {
|
|
fn hello(_a: i32) {}
|
|
fn test(_a: Self, _b: i32) {}
|
|
}
|
|
|
|
fn main() {
|
|
let _a = A {};
|
|
A::hello(1);
|
|
//~^ ERROR no method named `hello` found
|
|
A::test(_a, 1);
|
|
//~^ ERROR no method named `test` found
|
|
|
|
let _b = B {_b: ""};
|
|
B::<&str>::hello(1);
|
|
//~^ ERROR no method named `hello` found
|
|
B::<&str>::test(_b, 1);
|
|
//~^ ERROR no method named `test` found
|
|
}
|