2022-11-19 11:54:19 -06: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-27 19:57:39 -06:00
|
|
|
struct S;
|
|
|
|
impl S {
|
|
|
|
fn foo(&self) {}
|
|
|
|
}
|
2022-11-19 11:54:19 -06:00
|
|
|
fn main() {
|
2022-12-27 19:57:39 -06:00
|
|
|
let x = S;
|
|
|
|
foo::<()>(x);
|
2023-02-23 11:27:06 -06:00
|
|
|
//~^ ERROR method takes 0 generic arguments but 1 generic argument was supplied
|
2022-12-27 19:57:39 -06:00
|
|
|
//~| ERROR cannot find function `foo` in this scope
|
2022-11-19 11:54:19 -06:00
|
|
|
}
|