summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/no-method-suggested-traits.stderr
blob: 3c2c01dc227b9d45f49081d716e68b0d3db338f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
error[E0599]: no method named `method` found for type `u32` in the current scope
  --> $DIR/no-method-suggested-traits.rs:23:10
   |
LL |     1u32.method();
   |          ^^^^^^ method not found in `u32`
   |
   = help: items from traits can only be used if the trait is in scope
help: the following traits are implemented but not in scope; perhaps add a `use` for one of them:
   |
LL | use foo::Bar;
   |
LL | use no_method_suggested_traits::Reexported;
   |
LL | use no_method_suggested_traits::foo::PubPub;
   |
LL | use no_method_suggested_traits::qux::PrivPub;
   |

error[E0599]: no method named `method` found for struct `Rc<&mut Box<&u32>>` in the current scope
  --> $DIR/no-method-suggested-traits.rs:26:44
   |
LL |     std::rc::Rc::new(&mut Box::new(&1u32)).method();
   |                                            ^^^^^^ method not found in `Rc<&mut Box<&u32>>`
   |
   = help: items from traits can only be used if the trait is in scope
help: the following traits are implemented but not in scope; perhaps add a `use` for one of them:
   |
LL | use foo::Bar;
   |
LL | use no_method_suggested_traits::Reexported;
   |
LL | use no_method_suggested_traits::foo::PubPub;
   |
LL | use no_method_suggested_traits::qux::PrivPub;
   |

error[E0599]: no method named `method` found for type `char` in the current scope
  --> $DIR/no-method-suggested-traits.rs:30:9
   |
LL |         fn method(&self) {}
   |            ------ the method is available for `char` here
...
LL |     'a'.method();
   |         ^^^^^^ method not found in `char`
   |
   = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
   |
LL | use foo::Bar;
   |

error[E0599]: no method named `method` found for struct `Rc<&mut Box<&char>>` in the current scope
  --> $DIR/no-method-suggested-traits.rs:32:43
   |
LL |     std::rc::Rc::new(&mut Box::new(&'a')).method();
   |                                           ^^^^^^ method not found in `Rc<&mut Box<&char>>`
   |
   = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
   |
LL | use foo::Bar;
   |

error[E0599]: no method named `method` found for type `i32` in the current scope
  --> $DIR/no-method-suggested-traits.rs:35:10
   |
LL |     1i32.method();
   |          ^^^^^^ method not found in `i32`
   |
  ::: $DIR/auxiliary/no_method_suggested_traits.rs:8:12
   |
LL |         fn method(&self) {}
   |            ------ the method is available for `i32` here
   |
   = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
   |
LL | use no_method_suggested_traits::foo::PubPub;
   |

error[E0599]: no method named `method` found for struct `Rc<&mut Box<&i32>>` in the current scope
  --> $DIR/no-method-suggested-traits.rs:37:44
   |
LL |     std::rc::Rc::new(&mut Box::new(&1i32)).method();
   |                                            ^^^^^^ method not found in `Rc<&mut Box<&i32>>`
   |
   = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
   |
LL | use no_method_suggested_traits::foo::PubPub;
   |

error[E0599]: no method named `method` found for struct `Foo` in the current scope
  --> $DIR/no-method-suggested-traits.rs:40:9
   |
LL | struct Foo;
   | ---------- method `method` not found for this struct
...
LL |     Foo.method();
   |         ^^^^^^ method not found in `Foo`
   |
   = help: items from traits can only be used if the trait is implemented and in scope
   = note: the following traits define an item `method`, perhaps you need to implement one of them:
           candidate #1: `foo::Bar`
           candidate #2: `PubPub`
           candidate #3: `no_method_suggested_traits::qux::PrivPub`
           candidate #4: `Reexported`

error[E0599]: no method named `method` found for struct `Rc<&mut Box<&Foo>>` in the current scope
  --> $DIR/no-method-suggested-traits.rs:42:43
   |
LL |     std::rc::Rc::new(&mut Box::new(&Foo)).method();
   |                                           ^^^^^^ method not found in `Rc<&mut Box<&Foo>>`
   |
   = help: items from traits can only be used if the trait is implemented and in scope
   = note: the following traits define an item `method`, perhaps you need to implement one of them:
           candidate #1: `foo::Bar`
           candidate #2: `PubPub`
           candidate #3: `no_method_suggested_traits::qux::PrivPub`
           candidate #4: `Reexported`

error[E0599]: no method named `method2` found for type `u64` in the current scope
  --> $DIR/no-method-suggested-traits.rs:45:10
   |
LL |     1u64.method2();
   |          ^^^^^^^ method not found in `u64`
   |
   = help: items from traits can only be used if the trait is implemented and in scope
note: `foo::Bar` defines an item `method2`, perhaps you need to implement it
  --> $DIR/no-method-suggested-traits.rs:8:5
   |
LL |     pub trait Bar {
   |     ^^^^^^^^^^^^^

error[E0599]: no method named `method2` found for struct `Rc<&mut Box<&u64>>` in the current scope
  --> $DIR/no-method-suggested-traits.rs:47:44
   |
LL |     std::rc::Rc::new(&mut Box::new(&1u64)).method2();
   |                                            ^^^^^^^ method not found in `Rc<&mut Box<&u64>>`
   |
   = help: items from traits can only be used if the trait is implemented and in scope
note: `foo::Bar` defines an item `method2`, perhaps you need to implement it
  --> $DIR/no-method-suggested-traits.rs:8:5
   |
LL |     pub trait Bar {
   |     ^^^^^^^^^^^^^

error[E0599]: no method named `method2` found for struct `no_method_suggested_traits::Foo` in the current scope
  --> $DIR/no-method-suggested-traits.rs:50:37
   |
LL |     no_method_suggested_traits::Foo.method2();
   |                                     ^^^^^^^ method not found in `Foo`
   |
   = help: items from traits can only be used if the trait is implemented and in scope
note: `foo::Bar` defines an item `method2`, perhaps you need to implement it
  --> $DIR/no-method-suggested-traits.rs:8:5
   |
LL |     pub trait Bar {
   |     ^^^^^^^^^^^^^

error[E0599]: no method named `method2` found for struct `Rc<&mut Box<&no_method_suggested_traits::Foo>>` in the current scope
  --> $DIR/no-method-suggested-traits.rs:52:71
   |
LL |     std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method2();
   |                                                                       ^^^^^^^ method not found in `Rc<&mut Box<&Foo>>`
   |
   = help: items from traits can only be used if the trait is implemented and in scope
note: `foo::Bar` defines an item `method2`, perhaps you need to implement it
  --> $DIR/no-method-suggested-traits.rs:8:5
   |
LL |     pub trait Bar {
   |     ^^^^^^^^^^^^^

error[E0599]: no method named `method2` found for enum `no_method_suggested_traits::Bar` in the current scope
  --> $DIR/no-method-suggested-traits.rs:54:40
   |
LL |     no_method_suggested_traits::Bar::X.method2();
   |                                        ^^^^^^^ method not found in `Bar`
   |
   = help: items from traits can only be used if the trait is implemented and in scope
note: `foo::Bar` defines an item `method2`, perhaps you need to implement it
  --> $DIR/no-method-suggested-traits.rs:8:5
   |
LL |     pub trait Bar {
   |     ^^^^^^^^^^^^^

error[E0599]: no method named `method2` found for struct `Rc<&mut Box<&no_method_suggested_traits::Bar>>` in the current scope
  --> $DIR/no-method-suggested-traits.rs:56:74
   |
LL |     std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method2();
   |                                                                          ^^^^^^^ method not found in `Rc<&mut Box<&Bar>>`
   |
   = help: items from traits can only be used if the trait is implemented and in scope
note: `foo::Bar` defines an item `method2`, perhaps you need to implement it
  --> $DIR/no-method-suggested-traits.rs:8:5
   |
LL |     pub trait Bar {
   |     ^^^^^^^^^^^^^

error[E0599]: no method named `method3` found for struct `Foo` in the current scope
  --> $DIR/no-method-suggested-traits.rs:59:9
   |
LL | struct Foo;
   | ---------- method `method3` not found for this struct
...
LL |     Foo.method3();
   |         ^^^^^^^ method not found in `Foo`
   |
   = help: items from traits can only be used if the trait is implemented and in scope
   = note: the following trait defines an item `method3`, perhaps you need to implement it:
           candidate #1: `PubPub`

error[E0599]: no method named `method3` found for struct `Rc<&mut Box<&Foo>>` in the current scope
  --> $DIR/no-method-suggested-traits.rs:61:43
   |
LL |     std::rc::Rc::new(&mut Box::new(&Foo)).method3();
   |                                           ^^^^^^^ method not found in `Rc<&mut Box<&Foo>>`
   |
   = help: items from traits can only be used if the trait is implemented and in scope
   = note: the following trait defines an item `method3`, perhaps you need to implement it:
           candidate #1: `PubPub`

error[E0599]: no method named `method3` found for enum `Bar` in the current scope
  --> $DIR/no-method-suggested-traits.rs:63:12
   |
LL | enum Bar { X }
   | -------- method `method3` not found for this enum
...
LL |     Bar::X.method3();
   |            ^^^^^^^ method not found in `Bar`
   |
   = help: items from traits can only be used if the trait is implemented and in scope
   = note: the following trait defines an item `method3`, perhaps you need to implement it:
           candidate #1: `PubPub`

error[E0599]: no method named `method3` found for struct `Rc<&mut Box<&Bar>>` in the current scope
  --> $DIR/no-method-suggested-traits.rs:65:46
   |
LL |     std::rc::Rc::new(&mut Box::new(&Bar::X)).method3();
   |                                              ^^^^^^^ method not found in `Rc<&mut Box<&Bar>>`
   |
   = help: items from traits can only be used if the trait is implemented and in scope
   = note: the following trait defines an item `method3`, perhaps you need to implement it:
           candidate #1: `PubPub`

error[E0599]: no method named `method3` found for type `usize` in the current scope
  --> $DIR/no-method-suggested-traits.rs:69:13
   |
LL |     1_usize.method3();
   |             ^^^^^^^ method not found in `usize`

error[E0599]: no method named `method3` found for struct `Rc<&mut Box<&usize>>` in the current scope
  --> $DIR/no-method-suggested-traits.rs:70:47
   |
LL |     std::rc::Rc::new(&mut Box::new(&1_usize)).method3();
   |                                               ^^^^^^^ method not found in `Rc<&mut Box<&usize>>`

error[E0599]: no method named `method3` found for struct `no_method_suggested_traits::Foo` in the current scope
  --> $DIR/no-method-suggested-traits.rs:71:37
   |
LL |     no_method_suggested_traits::Foo.method3();
   |                                     ^^^^^^^ method not found in `Foo`

error[E0599]: no method named `method3` found for struct `Rc<&mut Box<&no_method_suggested_traits::Foo>>` in the current scope
  --> $DIR/no-method-suggested-traits.rs:72:71
   |
LL |     std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method3();
   |                                                                       ^^^^^^^ method not found in `Rc<&mut Box<&Foo>>`

error[E0599]: no method named `method3` found for enum `no_method_suggested_traits::Bar` in the current scope
  --> $DIR/no-method-suggested-traits.rs:74:40
   |
LL |     no_method_suggested_traits::Bar::X.method3();
   |                                        ^^^^^^^ method not found in `Bar`

error[E0599]: no method named `method3` found for struct `Rc<&mut Box<&no_method_suggested_traits::Bar>>` in the current scope
  --> $DIR/no-method-suggested-traits.rs:75:74
   |
LL |     std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method3();
   |                                                                          ^^^^^^^ method not found in `Rc<&mut Box<&Bar>>`

error: aborting due to 24 previous errors

For more information about this error, try `rustc --explain E0599`.