]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/no-method-suggested-traits.stderr
Use multiline note for trait suggestion
[rust.git] / src / test / ui / impl-trait / no-method-suggested-traits.stderr
1 error[E0599]: no method named `method` found for type `u32` in the current scope
2   --> $DIR/no-method-suggested-traits.rs:33:10
3    |
4 33 |     1u32.method();
5    |          ^^^^^^
6    |
7    = help: items from traits can only be used if the trait is in scope; the following traits are implemented but not in scope, perhaps add a `use` for one of them:
8            candidate #1: `use foo::Bar;`
9            candidate #2: `use no_method_suggested_traits::foo::PubPub;`
10
11 error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::boxed::Box<&u32>>` in the current scope
12   --> $DIR/no-method-suggested-traits.rs:38:44
13    |
14 38 |     std::rc::Rc::new(&mut Box::new(&1u32)).method();
15    |                                            ^^^^^^
16    |
17    = help: items from traits can only be used if the trait is in scope; the following traits are implemented but not in scope, perhaps add a `use` for one of them:
18            candidate #1: `use foo::Bar;`
19            candidate #2: `use no_method_suggested_traits::foo::PubPub;`
20
21 error[E0599]: no method named `method` found for type `char` in the current scope
22   --> $DIR/no-method-suggested-traits.rs:44:9
23    |
24 44 |     'a'.method();
25    |         ^^^^^^
26    |
27    = help: items from traits can only be used if the trait is in scope; the following trait is implemented but not in scope, perhaps add a `use` for it:
28            candidate #1: `use foo::Bar;`
29
30 error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::boxed::Box<&char>>` in the current scope
31   --> $DIR/no-method-suggested-traits.rs:48:43
32    |
33 48 |     std::rc::Rc::new(&mut Box::new(&'a')).method();
34    |                                           ^^^^^^
35    |
36    = help: items from traits can only be used if the trait is in scope; the following trait is implemented but not in scope, perhaps add a `use` for it:
37            candidate #1: `use foo::Bar;`
38
39 error[E0599]: no method named `method` found for type `i32` in the current scope
40   --> $DIR/no-method-suggested-traits.rs:53:10
41    |
42 53 |     1i32.method();
43    |          ^^^^^^
44    |
45    = help: items from traits can only be used if the trait is in scope; the following trait is implemented but not in scope, perhaps add a `use` for it:
46            candidate #1: `use no_method_suggested_traits::foo::PubPub;`
47
48 error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::boxed::Box<&i32>>` in the current scope
49   --> $DIR/no-method-suggested-traits.rs:57:44
50    |
51 57 |     std::rc::Rc::new(&mut Box::new(&1i32)).method();
52    |                                            ^^^^^^
53    |
54    = help: items from traits can only be used if the trait is in scope; the following trait is implemented but not in scope, perhaps add a `use` for it:
55            candidate #1: `use no_method_suggested_traits::foo::PubPub;`
56
57 error[E0599]: no method named `method` found for type `Foo` in the current scope
58   --> $DIR/no-method-suggested-traits.rs:62:9
59    |
60 62 |     Foo.method();
61    |         ^^^^^^
62    |
63    = help: items from traits can only be used if the trait is implemented and in scope; the following traits define an item `method`, perhaps you need to implement one of them:
64            candidate #1: `foo::Bar`
65            candidate #2: `no_method_suggested_traits::foo::PubPub`
66            candidate #3: `no_method_suggested_traits::bar::PubPriv`
67            candidate #4: `no_method_suggested_traits::qux::PrivPub`
68            candidate #5: `no_method_suggested_traits::quz::PrivPriv`
69            candidate #6: `no_method_suggested_traits::Reexported`
70
71 error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::boxed::Box<&Foo>>` in the current scope
72   --> $DIR/no-method-suggested-traits.rs:71:43
73    |
74 71 |     std::rc::Rc::new(&mut Box::new(&Foo)).method();
75    |                                           ^^^^^^
76    |
77    = help: items from traits can only be used if the trait is implemented and in scope; the following traits define an item `method`, perhaps you need to implement one of them:
78            candidate #1: `foo::Bar`
79            candidate #2: `no_method_suggested_traits::foo::PubPub`
80            candidate #3: `no_method_suggested_traits::bar::PubPriv`
81            candidate #4: `no_method_suggested_traits::qux::PrivPub`
82            candidate #5: `no_method_suggested_traits::quz::PrivPriv`
83            candidate #6: `no_method_suggested_traits::Reexported`
84
85 error[E0599]: no method named `method2` found for type `u64` in the current scope
86   --> $DIR/no-method-suggested-traits.rs:81:10
87    |
88 81 |     1u64.method2();
89    |          ^^^^^^^
90    |
91    = help: items from traits can only be used if the trait is implemented and in scope; the following trait defines an item `method2`, perhaps you need to implement it:
92            candidate #1: `foo::Bar`
93
94 error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::boxed::Box<&u64>>` in the current scope
95   --> $DIR/no-method-suggested-traits.rs:85:44
96    |
97 85 |     std::rc::Rc::new(&mut Box::new(&1u64)).method2();
98    |                                            ^^^^^^^
99    |
100    = help: items from traits can only be used if the trait is implemented and in scope; the following trait defines an item `method2`, perhaps you need to implement it:
101            candidate #1: `foo::Bar`
102
103 error[E0599]: no method named `method2` found for type `no_method_suggested_traits::Foo` in the current scope
104   --> $DIR/no-method-suggested-traits.rs:90:37
105    |
106 90 |     no_method_suggested_traits::Foo.method2();
107    |                                     ^^^^^^^
108    |
109    = help: items from traits can only be used if the trait is implemented and in scope; the following trait defines an item `method2`, perhaps you need to implement it:
110            candidate #1: `foo::Bar`
111
112 error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Foo>>` in the current scope
113   --> $DIR/no-method-suggested-traits.rs:94:71
114    |
115 94 |     std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method2();
116    |                                                                       ^^^^^^^
117    |
118    = help: items from traits can only be used if the trait is implemented and in scope; the following trait defines an item `method2`, perhaps you need to implement it:
119            candidate #1: `foo::Bar`
120
121 error[E0599]: no method named `method2` found for type `no_method_suggested_traits::Bar` in the current scope
122   --> $DIR/no-method-suggested-traits.rs:98:40
123    |
124 98 |     no_method_suggested_traits::Bar::X.method2();
125    |                                        ^^^^^^^
126    |
127    = help: items from traits can only be used if the trait is implemented and in scope; the following trait defines an item `method2`, perhaps you need to implement it:
128            candidate #1: `foo::Bar`
129
130 error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Bar>>` in the current scope
131    --> $DIR/no-method-suggested-traits.rs:102:74
132     |
133 102 |     std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method2();
134     |                                                                          ^^^^^^^
135     |
136     = help: items from traits can only be used if the trait is implemented and in scope; the following trait defines an item `method2`, perhaps you need to implement it:
137             candidate #1: `foo::Bar`
138
139 error[E0599]: no method named `method3` found for type `Foo` in the current scope
140    --> $DIR/no-method-suggested-traits.rs:107:9
141     |
142 107 |     Foo.method3();
143     |         ^^^^^^^
144     |
145     = help: items from traits can only be used if the trait is implemented and in scope; the following trait defines an item `method3`, perhaps you need to implement it:
146             candidate #1: `no_method_suggested_traits::foo::PubPub`
147
148 error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&Foo>>` in the current scope
149    --> $DIR/no-method-suggested-traits.rs:111:43
150     |
151 111 |     std::rc::Rc::new(&mut Box::new(&Foo)).method3();
152     |                                           ^^^^^^^
153     |
154     = help: items from traits can only be used if the trait is implemented and in scope; the following trait defines an item `method3`, perhaps you need to implement it:
155             candidate #1: `no_method_suggested_traits::foo::PubPub`
156
157 error[E0599]: no method named `method3` found for type `Bar` in the current scope
158    --> $DIR/no-method-suggested-traits.rs:115:12
159     |
160 115 |     Bar::X.method3();
161     |            ^^^^^^^
162     |
163     = help: items from traits can only be used if the trait is implemented and in scope; the following trait defines an item `method3`, perhaps you need to implement it:
164             candidate #1: `no_method_suggested_traits::foo::PubPub`
165
166 error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&Bar>>` in the current scope
167    --> $DIR/no-method-suggested-traits.rs:119:46
168     |
169 119 |     std::rc::Rc::new(&mut Box::new(&Bar::X)).method3();
170     |                                              ^^^^^^^
171     |
172     = help: items from traits can only be used if the trait is implemented and in scope; the following trait defines an item `method3`, perhaps you need to implement it:
173             candidate #1: `no_method_suggested_traits::foo::PubPub`
174
175 error[E0599]: no method named `method3` found for type `usize` in the current scope
176    --> $DIR/no-method-suggested-traits.rs:125:13
177     |
178 125 |     1_usize.method3(); //~ ERROR no method named
179     |             ^^^^^^^
180
181 error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&usize>>` in the current scope
182    --> $DIR/no-method-suggested-traits.rs:126:47
183     |
184 126 |     std::rc::Rc::new(&mut Box::new(&1_usize)).method3(); //~ ERROR no method named
185     |                                               ^^^^^^^
186
187 error[E0599]: no method named `method3` found for type `no_method_suggested_traits::Foo` in the current scope
188    --> $DIR/no-method-suggested-traits.rs:127:37
189     |
190 127 |     no_method_suggested_traits::Foo.method3();  //~ ERROR no method named
191     |                                     ^^^^^^^
192
193 error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Foo>>` in the current scope
194    --> $DIR/no-method-suggested-traits.rs:128:71
195     |
196 128 |     std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method3();
197     |                                                                       ^^^^^^^
198
199 error[E0599]: no method named `method3` found for type `no_method_suggested_traits::Bar` in the current scope
200    --> $DIR/no-method-suggested-traits.rs:130:40
201     |
202 130 |     no_method_suggested_traits::Bar::X.method3();  //~ ERROR no method named
203     |                                        ^^^^^^^
204
205 error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Bar>>` in the current scope
206    --> $DIR/no-method-suggested-traits.rs:131:74
207     |
208 131 |     std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method3();
209     |                                                                          ^^^^^^^
210
211 error: aborting due to previous error(s)
212