]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/suggest-assoc-fn-call-with-turbofish-placeholder.stderr
Rollup merge of #107632 - ameknite:issue-107622-fix, r=jyn514
[rust.git] / tests / ui / suggestions / suggest-assoc-fn-call-with-turbofish-placeholder.stderr
1 error[E0599]: no method named `default_hello` found for struct `GenericAssocMethod<{integer}>` in the current scope
2   --> $DIR/suggest-assoc-fn-call-with-turbofish-placeholder.rs:9:7
3    |
4 LL | struct GenericAssocMethod<T>(T);
5    | ---------------------------- method `default_hello` not found for this struct
6 ...
7 LL |     x.default_hello();
8    |     --^^^^^^^^^^^^^--
9    |     | |
10    |     | this is an associated function, not a method
11    |     help: use associated function syntax instead: `GenericAssocMethod::<_>::default_hello()`
12    |
13    = note: found the following associated functions; to be used as methods, functions must have a `self` parameter
14 note: the candidate is defined in an impl for the type `GenericAssocMethod<T>`
15   --> $DIR/suggest-assoc-fn-call-with-turbofish-placeholder.rs:4:5
16    |
17 LL |     fn default_hello() {}
18    |     ^^^^^^^^^^^^^^^^^^
19
20 error: aborting due to previous error
21
22 For more information about this error, try `rustc --explain E0599`.