]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/issue-104287.rs
Merge commit '598f0909568a51de8a2d1148f55a644fd8dffad0' into sync_cg_clif-2023-01-24
[rust.git] / tests / ui / suggestions / issue-104287.rs
1 // The purpose of this test is not to validate the output of the compiler.
2 // Instead, it ensures the suggestion is generated without performing an arithmetic overflow.
3
4 struct S;
5 impl S {
6     fn foo(&self) {}
7 }
8 fn main() {
9     let x = S;
10     foo::<()>(x);
11     //~^ ERROR this associated function takes 0 generic arguments but 1 generic argument was supplied
12     //~| ERROR cannot find function `foo` in this scope
13 }