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