]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/suggest-assoc-fn-call-with-turbofish.stderr
Rollup merge of #107559 - WaffleLapkin:is_it_2015¿, r=davidtwco
[rust.git] / tests / ui / suggestions / suggest-assoc-fn-call-with-turbofish.stderr
1 error[E0599]: no method named `self_ty_ref_hello` found for struct `GenericAssocMethod<{integer}>` in the current scope
2   --> $DIR/suggest-assoc-fn-call-with-turbofish.rs:14:7
3    |
4 LL | struct GenericAssocMethod<T>(T);
5    | ---------------------------- method `self_ty_ref_hello` not found for this struct
6 ...
7 LL |     x.self_ty_ref_hello();
8    |     --^^^^^^^^^^^^^^^^^--
9    |     | |
10    |     | this is an associated function, not a method
11    |     help: use associated function syntax instead: `GenericAssocMethod::<_>::self_ty_ref_hello(&x)`
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.rs:8:5
16    |
17 LL |     fn self_ty_ref_hello(_: &Self) {}
18    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19
20 error[E0599]: no method named `self_ty_hello` found for struct `GenericAssocMethod<{integer}>` in the current scope
21   --> $DIR/suggest-assoc-fn-call-with-turbofish.rs:16:7
22    |
23 LL | struct GenericAssocMethod<T>(T);
24    | ---------------------------- method `self_ty_hello` not found for this struct
25 ...
26 LL |     x.self_ty_hello();
27    |     --^^^^^^^^^^^^^--
28    |     | |
29    |     | this is an associated function, not a method
30    |     help: use associated function syntax instead: `GenericAssocMethod::<_>::self_ty_hello(x)`
31    |
32    = note: found the following associated functions; to be used as methods, functions must have a `self` parameter
33 note: the candidate is defined in an impl for the type `GenericAssocMethod<T>`
34   --> $DIR/suggest-assoc-fn-call-with-turbofish.rs:7:5
35    |
36 LL |     fn self_ty_hello(_: Self) {}
37    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
38
39 error[E0599]: no method named `default_hello` found for struct `GenericAssocMethod<i32>` in the current scope
40   --> $DIR/suggest-assoc-fn-call-with-turbofish.rs:20:7
41    |
42 LL | struct GenericAssocMethod<T>(T);
43    | ---------------------------- method `default_hello` not found for this struct
44 ...
45 LL |     y.default_hello();
46    |     --^^^^^^^^^^^^^--
47    |     | |
48    |     | this is an associated function, not a method
49    |     help: use associated function syntax instead: `GenericAssocMethod::<i32>::default_hello()`
50    |
51    = note: found the following associated functions; to be used as methods, functions must have a `self` parameter
52 note: the candidate is defined in an impl for the type `GenericAssocMethod<T>`
53   --> $DIR/suggest-assoc-fn-call-with-turbofish.rs:6:5
54    |
55 LL |     fn default_hello() {}
56    |     ^^^^^^^^^^^^^^^^^^
57
58 error[E0599]: no method named `self_ty_ref_hello` found for struct `GenericAssocMethod<i32>` in the current scope
59   --> $DIR/suggest-assoc-fn-call-with-turbofish.rs:22:7
60    |
61 LL | struct GenericAssocMethod<T>(T);
62    | ---------------------------- method `self_ty_ref_hello` not found for this struct
63 ...
64 LL |     y.self_ty_ref_hello();
65    |     --^^^^^^^^^^^^^^^^^--
66    |     | |
67    |     | this is an associated function, not a method
68    |     help: use associated function syntax instead: `GenericAssocMethod::<i32>::self_ty_ref_hello(&y)`
69    |
70    = note: found the following associated functions; to be used as methods, functions must have a `self` parameter
71 note: the candidate is defined in an impl for the type `GenericAssocMethod<T>`
72   --> $DIR/suggest-assoc-fn-call-with-turbofish.rs:8:5
73    |
74 LL |     fn self_ty_ref_hello(_: &Self) {}
75    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
76
77 error[E0599]: no method named `self_ty_hello` found for struct `GenericAssocMethod<i32>` in the current scope
78   --> $DIR/suggest-assoc-fn-call-with-turbofish.rs:24:7
79    |
80 LL | struct GenericAssocMethod<T>(T);
81    | ---------------------------- method `self_ty_hello` not found for this struct
82 ...
83 LL |     y.self_ty_hello();
84    |     --^^^^^^^^^^^^^--
85    |     | |
86    |     | this is an associated function, not a method
87    |     help: use associated function syntax instead: `GenericAssocMethod::<i32>::self_ty_hello(y)`
88    |
89    = note: found the following associated functions; to be used as methods, functions must have a `self` parameter
90 note: the candidate is defined in an impl for the type `GenericAssocMethod<T>`
91   --> $DIR/suggest-assoc-fn-call-with-turbofish.rs:7:5
92    |
93 LL |     fn self_ty_hello(_: Self) {}
94    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
95
96 error: aborting due to 5 previous errors
97
98 For more information about this error, try `rustc --explain E0599`.