2022-09-23 06:40:20 -05:00
|
|
|
error[E0599]: no method named `self_ty_ref_hello` found for struct `GenericAssocMethod<{integer}>` in the current scope
|
2022-09-25 18:33:08 -05:00
|
|
|
--> $DIR/suggest-assoc-fn-call-with-turbofish.rs:14:7
|
2022-09-23 06:40:20 -05:00
|
|
|
|
|
|
|
|
LL | struct GenericAssocMethod<T>(T);
|
|
|
|
| ---------------------------- method `self_ty_ref_hello` not found for this struct
|
|
|
|
...
|
|
|
|
LL | x.self_ty_ref_hello();
|
2022-09-23 11:09:32 -05:00
|
|
|
| --^^^^^^^^^^^^^^^^^--
|
2022-09-23 06:40:20 -05:00
|
|
|
| | |
|
|
|
|
| | this is an associated function, not a method
|
2022-09-23 11:09:32 -05:00
|
|
|
| help: use associated function syntax instead: `GenericAssocMethod::<_>::self_ty_ref_hello(&x)`
|
2022-09-23 06:40:20 -05:00
|
|
|
|
|
|
|
|
= note: found the following associated functions; to be used as methods, functions must have a `self` parameter
|
|
|
|
note: the candidate is defined in an impl for the type `GenericAssocMethod<T>`
|
2022-09-23 11:09:32 -05:00
|
|
|
--> $DIR/suggest-assoc-fn-call-with-turbofish.rs:8:5
|
2022-09-23 06:40:20 -05:00
|
|
|
|
|
2022-09-23 11:09:32 -05:00
|
|
|
LL | fn self_ty_ref_hello(_: &Self) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-09-23 06:40:20 -05:00
|
|
|
|
|
|
|
error[E0599]: no method named `self_ty_hello` found for struct `GenericAssocMethod<{integer}>` in the current scope
|
2022-09-25 18:33:08 -05:00
|
|
|
--> $DIR/suggest-assoc-fn-call-with-turbofish.rs:16:7
|
2022-09-23 06:40:20 -05:00
|
|
|
|
|
|
|
|
LL | struct GenericAssocMethod<T>(T);
|
|
|
|
| ---------------------------- method `self_ty_hello` not found for this struct
|
|
|
|
...
|
|
|
|
LL | x.self_ty_hello();
|
2022-09-23 11:09:32 -05:00
|
|
|
| --^^^^^^^^^^^^^--
|
2022-09-23 06:40:20 -05:00
|
|
|
| | |
|
|
|
|
| | this is an associated function, not a method
|
2022-09-23 11:09:32 -05:00
|
|
|
| help: use associated function syntax instead: `GenericAssocMethod::<_>::self_ty_hello(x)`
|
2022-09-23 06:40:20 -05:00
|
|
|
|
|
|
|
|
= note: found the following associated functions; to be used as methods, functions must have a `self` parameter
|
|
|
|
note: the candidate is defined in an impl for the type `GenericAssocMethod<T>`
|
2022-09-23 11:09:32 -05:00
|
|
|
--> $DIR/suggest-assoc-fn-call-with-turbofish.rs:7:5
|
2022-09-23 06:40:20 -05:00
|
|
|
|
|
2022-09-23 11:09:32 -05:00
|
|
|
LL | fn self_ty_hello(_: Self) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-09-23 06:40:20 -05:00
|
|
|
|
|
|
|
error[E0599]: no method named `default_hello` found for struct `GenericAssocMethod<i32>` in the current scope
|
2022-09-25 18:33:08 -05:00
|
|
|
--> $DIR/suggest-assoc-fn-call-with-turbofish.rs:20:7
|
2022-09-23 06:40:20 -05:00
|
|
|
|
|
|
|
|
LL | struct GenericAssocMethod<T>(T);
|
|
|
|
| ---------------------------- method `default_hello` not found for this struct
|
|
|
|
...
|
|
|
|
LL | y.default_hello();
|
2022-09-23 11:09:32 -05:00
|
|
|
| --^^^^^^^^^^^^^--
|
2022-09-23 06:40:20 -05:00
|
|
|
| | |
|
|
|
|
| | this is an associated function, not a method
|
2022-09-23 11:09:32 -05:00
|
|
|
| help: use associated function syntax instead: `GenericAssocMethod::<i32>::default_hello()`
|
2022-09-23 06:40:20 -05:00
|
|
|
|
|
|
|
|
= note: found the following associated functions; to be used as methods, functions must have a `self` parameter
|
|
|
|
note: the candidate is defined in an impl for the type `GenericAssocMethod<T>`
|
2022-09-23 11:09:32 -05:00
|
|
|
--> $DIR/suggest-assoc-fn-call-with-turbofish.rs:6:5
|
2022-09-23 06:40:20 -05:00
|
|
|
|
|
|
|
|
LL | fn default_hello() {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0599]: no method named `self_ty_ref_hello` found for struct `GenericAssocMethod<i32>` in the current scope
|
2022-09-25 18:33:08 -05:00
|
|
|
--> $DIR/suggest-assoc-fn-call-with-turbofish.rs:22:7
|
2022-09-23 06:40:20 -05:00
|
|
|
|
|
|
|
|
LL | struct GenericAssocMethod<T>(T);
|
|
|
|
| ---------------------------- method `self_ty_ref_hello` not found for this struct
|
|
|
|
...
|
|
|
|
LL | y.self_ty_ref_hello();
|
2022-09-23 11:09:32 -05:00
|
|
|
| --^^^^^^^^^^^^^^^^^--
|
2022-09-23 06:40:20 -05:00
|
|
|
| | |
|
|
|
|
| | this is an associated function, not a method
|
2022-09-23 11:09:32 -05:00
|
|
|
| help: use associated function syntax instead: `GenericAssocMethod::<i32>::self_ty_ref_hello(&y)`
|
2022-09-23 06:40:20 -05:00
|
|
|
|
|
|
|
|
= note: found the following associated functions; to be used as methods, functions must have a `self` parameter
|
|
|
|
note: the candidate is defined in an impl for the type `GenericAssocMethod<T>`
|
2022-09-23 11:09:32 -05:00
|
|
|
--> $DIR/suggest-assoc-fn-call-with-turbofish.rs:8:5
|
2022-09-23 06:40:20 -05:00
|
|
|
|
|
2022-09-23 11:09:32 -05:00
|
|
|
LL | fn self_ty_ref_hello(_: &Self) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-09-23 06:40:20 -05:00
|
|
|
|
|
|
|
error[E0599]: no method named `self_ty_hello` found for struct `GenericAssocMethod<i32>` in the current scope
|
2022-09-25 18:33:08 -05:00
|
|
|
--> $DIR/suggest-assoc-fn-call-with-turbofish.rs:24:7
|
2022-09-23 06:40:20 -05:00
|
|
|
|
|
|
|
|
LL | struct GenericAssocMethod<T>(T);
|
|
|
|
| ---------------------------- method `self_ty_hello` not found for this struct
|
|
|
|
...
|
|
|
|
LL | y.self_ty_hello();
|
2022-09-23 11:09:32 -05:00
|
|
|
| --^^^^^^^^^^^^^--
|
2022-09-23 06:40:20 -05:00
|
|
|
| | |
|
|
|
|
| | this is an associated function, not a method
|
2022-09-23 11:09:32 -05:00
|
|
|
| help: use associated function syntax instead: `GenericAssocMethod::<i32>::self_ty_hello(y)`
|
2022-09-23 06:40:20 -05:00
|
|
|
|
|
|
|
|
= note: found the following associated functions; to be used as methods, functions must have a `self` parameter
|
|
|
|
note: the candidate is defined in an impl for the type `GenericAssocMethod<T>`
|
2022-09-23 11:09:32 -05:00
|
|
|
--> $DIR/suggest-assoc-fn-call-with-turbofish.rs:7:5
|
2022-09-23 06:40:20 -05:00
|
|
|
|
|
2022-09-23 11:09:32 -05:00
|
|
|
LL | fn self_ty_hello(_: Self) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-09-23 06:40:20 -05:00
|
|
|
|
2022-09-23 11:09:32 -05:00
|
|
|
error: aborting due to 5 previous errors
|
2019-10-05 18:11:36 -05:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0599`.
|