]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/issue-104287.rs
Rollup merge of #104965 - zacklukem:p-option-as_ref-docs, r=scottmcm
[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 }