fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
4.3 KiB98 linesraw
1error[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   |
4LL | struct GenericAssocMethod<T>(T);
5   | ---------------------------- method `self_ty_ref_hello` not found for this struct
6...
7LL |     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
14note: the candidate is defined in an impl for the type `GenericAssocMethod<T>`
15  --> $DIR/suggest-assoc-fn-call-with-turbofish.rs:8:5
16   |
17LL |     fn self_ty_ref_hello(_: &Self) {}
18   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19
20error[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   |
23LL | struct GenericAssocMethod<T>(T);
24   | ---------------------------- method `self_ty_hello` not found for this struct
25...
26LL |     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
33note: the candidate is defined in an impl for the type `GenericAssocMethod<T>`
34  --> $DIR/suggest-assoc-fn-call-with-turbofish.rs:7:5
35   |
36LL |     fn self_ty_hello(_: Self) {}
37   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
38
39error[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   |
42LL | struct GenericAssocMethod<T>(T);
43   | ---------------------------- method `default_hello` not found for this struct
44...
45LL |     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
52note: the candidate is defined in an impl for the type `GenericAssocMethod<T>`
53  --> $DIR/suggest-assoc-fn-call-with-turbofish.rs:6:5
54   |
55LL |     fn default_hello() {}
56   |     ^^^^^^^^^^^^^^^^^^
57
58error[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   |
61LL | struct GenericAssocMethod<T>(T);
62   | ---------------------------- method `self_ty_ref_hello` not found for this struct
63...
64LL |     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
71note: the candidate is defined in an impl for the type `GenericAssocMethod<T>`
72  --> $DIR/suggest-assoc-fn-call-with-turbofish.rs:8:5
73   |
74LL |     fn self_ty_ref_hello(_: &Self) {}
75   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
76
77error[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   |
80LL | struct GenericAssocMethod<T>(T);
81   | ---------------------------- method `self_ty_hello` not found for this struct
82...
83LL |     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
90note: the candidate is defined in an impl for the type `GenericAssocMethod<T>`
91  --> $DIR/suggest-assoc-fn-call-with-turbofish.rs:7:5
92   |
93LL |     fn self_ty_hello(_: Self) {}
94   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
95
96error: aborting due to 5 previous errors
97
98For more information about this error, try `rustc --explain E0599`.