2022-11-19 17:54:19 +00:00
|
|
|
// The purpose of this test is not to validate the output of the compiler.
|
|
|
|
// Instead, it ensures the suggestion is generated without performing an arithmetic overflow.
|
|
|
|
|
2022-12-28 01:57:39 +00:00
|
|
|
struct S;
|
|
|
|
impl S {
|
|
|
|
fn foo(&self) {}
|
|
|
|
}
|
2022-11-19 17:54:19 +00:00
|
|
|
fn main() {
|
2022-12-28 01:57:39 +00:00
|
|
|
let x = S;
|
|
|
|
foo::<()>(x);
|
2022-11-19 17:54:19 +00:00
|
|
|
//~^ ERROR this associated function takes 0 generic arguments but 1 generic argument was supplied
|
2022-12-28 01:57:39 +00:00
|
|
|
//~| ERROR cannot find function `foo` in this scope
|
2022-11-19 17:54:19 +00:00
|
|
|
}
|