]> git.proxmox.com Git - rustc.git/blame - src/test/ui/impl-trait/no-method-suggested-traits.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / impl-trait / no-method-suggested-traits.stderr
CommitLineData
7cac9316 1error[E0599]: no method named `method` found for type `u32` in the current scope
0731742a 2 --> $DIR/no-method-suggested-traits.rs:23:10
7cac9316 3 |
0531ce1d 4LL | 1u32.method();
e1599b0c 5 | ^^^^^^ method not found in `u32`
7cac9316
XL
6 |
7 = help: items from traits can only be used if the trait is in scope
e74abb32 8help: the following traits are implemented but not in scope; perhaps add a `use` for one of them:
ff7c6d11 9 |
0531ce1d 10LL | use foo::Bar;
ff7c6d11 11 |
0531ce1d 12LL | use no_method_suggested_traits::foo::PubPub;
ff7c6d11 13 |
0531ce1d 14LL | use no_method_suggested_traits::qux::PrivPub;
ff7c6d11 15 |
0531ce1d 16LL | use no_method_suggested_traits::Reexported;
ff7c6d11 17 |
7cac9316
XL
18
19error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::boxed::Box<&u32>>` in the current scope
0731742a 20 --> $DIR/no-method-suggested-traits.rs:26:44
7cac9316 21 |
0531ce1d 22LL | std::rc::Rc::new(&mut Box::new(&1u32)).method();
e1599b0c 23 | ^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&u32>>`
7cac9316
XL
24 |
25 = help: items from traits can only be used if the trait is in scope
e74abb32 26help: the following traits are implemented but not in scope; perhaps add a `use` for one of them:
ff7c6d11 27 |
0531ce1d 28LL | use foo::Bar;
ff7c6d11 29 |
0531ce1d 30LL | use no_method_suggested_traits::foo::PubPub;
ff7c6d11 31 |
0531ce1d 32LL | use no_method_suggested_traits::qux::PrivPub;
ff7c6d11 33 |
0531ce1d 34LL | use no_method_suggested_traits::Reexported;
ff7c6d11 35 |
7cac9316
XL
36
37error[E0599]: no method named `method` found for type `char` in the current scope
0731742a 38 --> $DIR/no-method-suggested-traits.rs:30:9
7cac9316 39 |
0531ce1d 40LL | 'a'.method();
e1599b0c 41 | ^^^^^^ method not found in `char`
7cac9316
XL
42 |
43 = help: items from traits can only be used if the trait is in scope
e74abb32 44help: the following trait is implemented but not in scope; perhaps add a `use` for it:
ff7c6d11 45 |
0531ce1d 46LL | use foo::Bar;
ff7c6d11 47 |
7cac9316
XL
48
49error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::boxed::Box<&char>>` in the current scope
0731742a 50 --> $DIR/no-method-suggested-traits.rs:32:43
7cac9316 51 |
e1599b0c
XL
52LL | fn method(&self) {}
53 | ------
54 | |
55 | the method is available for `std::boxed::Box<std::rc::Rc<&mut std::boxed::Box<&char>>>` here
56 | the method is available for `std::pin::Pin<std::rc::Rc<&mut std::boxed::Box<&char>>>` here
57 | the method is available for `std::sync::Arc<std::rc::Rc<&mut std::boxed::Box<&char>>>` here
58 | the method is available for `std::rc::Rc<std::rc::Rc<&mut std::boxed::Box<&char>>>` here
59...
0531ce1d 60LL | std::rc::Rc::new(&mut Box::new(&'a')).method();
e1599b0c 61 | ^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&char>>`
7cac9316
XL
62 |
63 = help: items from traits can only be used if the trait is in scope
e74abb32 64help: the following trait is implemented but not in scope; perhaps add a `use` for it:
ff7c6d11 65 |
0531ce1d 66LL | use foo::Bar;
ff7c6d11 67 |
7cac9316
XL
68
69error[E0599]: no method named `method` found for type `i32` in the current scope
0731742a 70 --> $DIR/no-method-suggested-traits.rs:35:10
7cac9316 71 |
0531ce1d 72LL | 1i32.method();
e1599b0c 73 | ^^^^^^ method not found in `i32`
7cac9316
XL
74 |
75 = help: items from traits can only be used if the trait is in scope
e74abb32 76help: the following trait is implemented but not in scope; perhaps add a `use` for it:
ff7c6d11 77 |
0531ce1d 78LL | use no_method_suggested_traits::foo::PubPub;
ff7c6d11 79 |
7cac9316
XL
80
81error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::boxed::Box<&i32>>` in the current scope
0731742a 82 --> $DIR/no-method-suggested-traits.rs:37:44
7cac9316 83 |
0531ce1d 84LL | std::rc::Rc::new(&mut Box::new(&1i32)).method();
e1599b0c 85 | ^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&i32>>`
7cac9316
XL
86 |
87 = help: items from traits can only be used if the trait is in scope
e74abb32 88help: the following trait is implemented but not in scope; perhaps add a `use` for it:
ff7c6d11 89 |
0531ce1d 90LL | use no_method_suggested_traits::foo::PubPub;
ff7c6d11 91 |
7cac9316
XL
92
93error[E0599]: no method named `method` found for type `Foo` in the current scope
0731742a 94 --> $DIR/no-method-suggested-traits.rs:40:9
7cac9316 95 |
0531ce1d 96LL | struct Foo;
ff7c6d11
XL
97 | ----------- method `method` not found for this
98...
0531ce1d 99LL | Foo.method();
e1599b0c 100 | ^^^^^^ method not found in `Foo`
7cac9316
XL
101 |
102 = help: items from traits can only be used if the trait is implemented and in scope
103 = note: the following traits define an item `method`, perhaps you need to implement one of them:
104 candidate #1: `foo::Bar`
105 candidate #2: `no_method_suggested_traits::foo::PubPub`
2c00a5a8
XL
106 candidate #3: `no_method_suggested_traits::qux::PrivPub`
107 candidate #4: `no_method_suggested_traits::Reexported`
7cac9316
XL
108
109error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::boxed::Box<&Foo>>` in the current scope
0731742a 110 --> $DIR/no-method-suggested-traits.rs:42:43
7cac9316 111 |
0531ce1d 112LL | std::rc::Rc::new(&mut Box::new(&Foo)).method();
e1599b0c 113 | ^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&Foo>>`
7cac9316
XL
114 |
115 = help: items from traits can only be used if the trait is implemented and in scope
116 = note: the following traits define an item `method`, perhaps you need to implement one of them:
117 candidate #1: `foo::Bar`
118 candidate #2: `no_method_suggested_traits::foo::PubPub`
2c00a5a8
XL
119 candidate #3: `no_method_suggested_traits::qux::PrivPub`
120 candidate #4: `no_method_suggested_traits::Reexported`
7cac9316
XL
121
122error[E0599]: no method named `method2` found for type `u64` in the current scope
0731742a 123 --> $DIR/no-method-suggested-traits.rs:45:10
7cac9316 124 |
0531ce1d 125LL | 1u64.method2();
e1599b0c 126 | ^^^^^^^ method not found in `u64`
7cac9316
XL
127 |
128 = help: items from traits can only be used if the trait is implemented and in scope
129 = note: the following trait defines an item `method2`, perhaps you need to implement it:
130 candidate #1: `foo::Bar`
131
132error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::boxed::Box<&u64>>` in the current scope
0731742a 133 --> $DIR/no-method-suggested-traits.rs:47:44
7cac9316 134 |
0531ce1d 135LL | std::rc::Rc::new(&mut Box::new(&1u64)).method2();
e1599b0c 136 | ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&u64>>`
7cac9316
XL
137 |
138 = help: items from traits can only be used if the trait is implemented and in scope
139 = note: the following trait defines an item `method2`, perhaps you need to implement it:
140 candidate #1: `foo::Bar`
141
142error[E0599]: no method named `method2` found for type `no_method_suggested_traits::Foo` in the current scope
0731742a 143 --> $DIR/no-method-suggested-traits.rs:50:37
7cac9316 144 |
0531ce1d 145LL | no_method_suggested_traits::Foo.method2();
e1599b0c 146 | ^^^^^^^ method not found in `no_method_suggested_traits::Foo`
7cac9316
XL
147 |
148 = help: items from traits can only be used if the trait is implemented and in scope
149 = note: the following trait defines an item `method2`, perhaps you need to implement it:
150 candidate #1: `foo::Bar`
151
152error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Foo>>` in the current scope
0731742a 153 --> $DIR/no-method-suggested-traits.rs:52:71
7cac9316 154 |
0531ce1d 155LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method2();
e1599b0c 156 | ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Foo>>`
7cac9316
XL
157 |
158 = help: items from traits can only be used if the trait is implemented and in scope
159 = note: the following trait defines an item `method2`, perhaps you need to implement it:
160 candidate #1: `foo::Bar`
161
162error[E0599]: no method named `method2` found for type `no_method_suggested_traits::Bar` in the current scope
0731742a 163 --> $DIR/no-method-suggested-traits.rs:54:40
7cac9316 164 |
0531ce1d 165LL | no_method_suggested_traits::Bar::X.method2();
e1599b0c 166 | ^^^^^^^ method not found in `no_method_suggested_traits::Bar`
7cac9316
XL
167 |
168 = help: items from traits can only be used if the trait is implemented and in scope
169 = note: the following trait defines an item `method2`, perhaps you need to implement it:
170 candidate #1: `foo::Bar`
171
172error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Bar>>` in the current scope
0731742a 173 --> $DIR/no-method-suggested-traits.rs:56:74
ff7c6d11 174 |
0531ce1d 175LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method2();
e1599b0c 176 | ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Bar>>`
ff7c6d11
XL
177 |
178 = help: items from traits can only be used if the trait is implemented and in scope
179 = note: the following trait defines an item `method2`, perhaps you need to implement it:
180 candidate #1: `foo::Bar`
7cac9316
XL
181
182error[E0599]: no method named `method3` found for type `Foo` in the current scope
0731742a 183 --> $DIR/no-method-suggested-traits.rs:59:9
ff7c6d11 184 |
0531ce1d 185LL | struct Foo;
ff7c6d11
XL
186 | ----------- method `method3` not found for this
187...
0531ce1d 188LL | Foo.method3();
e1599b0c 189 | ^^^^^^^ method not found in `Foo`
ff7c6d11
XL
190 |
191 = help: items from traits can only be used if the trait is implemented and in scope
192 = note: the following trait defines an item `method3`, perhaps you need to implement it:
193 candidate #1: `no_method_suggested_traits::foo::PubPub`
7cac9316
XL
194
195error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&Foo>>` in the current scope
0731742a 196 --> $DIR/no-method-suggested-traits.rs:61:43
ff7c6d11 197 |
0531ce1d 198LL | std::rc::Rc::new(&mut Box::new(&Foo)).method3();
e1599b0c 199 | ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&Foo>>`
ff7c6d11
XL
200 |
201 = help: items from traits can only be used if the trait is implemented and in scope
202 = note: the following trait defines an item `method3`, perhaps you need to implement it:
203 candidate #1: `no_method_suggested_traits::foo::PubPub`
7cac9316
XL
204
205error[E0599]: no method named `method3` found for type `Bar` in the current scope
0731742a 206 --> $DIR/no-method-suggested-traits.rs:63:12
ff7c6d11 207 |
0531ce1d 208LL | enum Bar { X }
ff7c6d11
XL
209 | -------- method `method3` not found for this
210...
0531ce1d 211LL | Bar::X.method3();
e1599b0c 212 | ^^^^^^^ method not found in `Bar`
ff7c6d11
XL
213 |
214 = help: items from traits can only be used if the trait is implemented and in scope
215 = note: the following trait defines an item `method3`, perhaps you need to implement it:
216 candidate #1: `no_method_suggested_traits::foo::PubPub`
7cac9316
XL
217
218error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&Bar>>` in the current scope
0731742a 219 --> $DIR/no-method-suggested-traits.rs:65:46
ff7c6d11 220 |
0531ce1d 221LL | std::rc::Rc::new(&mut Box::new(&Bar::X)).method3();
e1599b0c 222 | ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&Bar>>`
ff7c6d11
XL
223 |
224 = help: items from traits can only be used if the trait is implemented and in scope
225 = note: the following trait defines an item `method3`, perhaps you need to implement it:
226 candidate #1: `no_method_suggested_traits::foo::PubPub`
7cac9316
XL
227
228error[E0599]: no method named `method3` found for type `usize` in the current scope
0731742a 229 --> $DIR/no-method-suggested-traits.rs:69:13
ff7c6d11 230 |
532ac7d7 231LL | 1_usize.method3();
e1599b0c 232 | ^^^^^^^ method not found in `usize`
7cac9316
XL
233
234error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&usize>>` in the current scope
0731742a 235 --> $DIR/no-method-suggested-traits.rs:70:47
ff7c6d11 236 |
532ac7d7 237LL | std::rc::Rc::new(&mut Box::new(&1_usize)).method3();
e1599b0c 238 | ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&usize>>`
7cac9316
XL
239
240error[E0599]: no method named `method3` found for type `no_method_suggested_traits::Foo` in the current scope
0731742a 241 --> $DIR/no-method-suggested-traits.rs:71:37
ff7c6d11 242 |
532ac7d7 243LL | no_method_suggested_traits::Foo.method3();
e1599b0c 244 | ^^^^^^^ method not found in `no_method_suggested_traits::Foo`
7cac9316
XL
245
246error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Foo>>` in the current scope
0731742a 247 --> $DIR/no-method-suggested-traits.rs:72:71
ff7c6d11 248 |
0531ce1d 249LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method3();
e1599b0c 250 | ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Foo>>`
7cac9316
XL
251
252error[E0599]: no method named `method3` found for type `no_method_suggested_traits::Bar` in the current scope
0731742a 253 --> $DIR/no-method-suggested-traits.rs:74:40
ff7c6d11 254 |
532ac7d7 255LL | no_method_suggested_traits::Bar::X.method3();
e1599b0c 256 | ^^^^^^^ method not found in `no_method_suggested_traits::Bar`
7cac9316
XL
257
258error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Bar>>` in the current scope
0731742a 259 --> $DIR/no-method-suggested-traits.rs:75:74
ff7c6d11 260 |
0531ce1d 261LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method3();
e1599b0c 262 | ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Bar>>`
7cac9316 263
041b39d2 264error: aborting due to 24 previous errors
7cac9316 265
0531ce1d 266For more information about this error, try `rustc --explain E0599`.