@@ -211,7 +211,7 @@ in question exports them.
211
211
A working version would be:
212
212
213
213
```ignore
214
- // In some_crate:
214
+ // In some_crate crate :
215
215
#[macro_export]
216
216
macro_rules! eat {
217
217
...
@@ -228,6 +228,48 @@ extern crate some_crate; //ok!
228
228
```
229
229
"## ,
230
230
231
+ E0470 : r##"
232
+ A macro listed for reexport was not found.
233
+
234
+ Erroneous code example:
235
+
236
+ ```compile_fail,E0470
237
+ #[macro_reexport(drink, be_merry)]
238
+ extern crate collections;
239
+
240
+ fn main() {
241
+ // ...
242
+ }
243
+ ```
244
+
245
+ Either the listed macro is not contained in the imported crate, or it is not
246
+ exported from the given crate.
247
+
248
+ This could be caused by a typo. Did you misspell the macro's name?
249
+
250
+ Double-check the names of the macros listed for reexport, and that the crate
251
+ in question exports them.
252
+
253
+ A working version:
254
+
255
+ ```ignore
256
+ // In some_crate crate:
257
+ #[macro_export]
258
+ macro_rules! eat {
259
+ ...
260
+ }
261
+
262
+ #[macro_export]
263
+ macro_rules! drink {
264
+ ...
265
+ }
266
+
267
+ // In your_crate:
268
+ #[macro_reexport(eat, drink)]
269
+ extern crate some_crate;
270
+ ```
271
+ "## ,
272
+
231
273
}
232
274
233
275
register_diagnostics ! {
@@ -239,7 +281,6 @@ register_diagnostics! {
239
281
E0462 , // found staticlib `..` instead of rlib or dylib
240
282
E0464 , // multiple matching crates for `..`
241
283
E0465 , // multiple .. candidates for `..` found
242
- E0470 , // reexported macro not found
243
284
E0519 , // local crate and dependency have same (crate-name, disambiguator)
244
285
E0523 , // two dependencies have same (crate-name, disambiguator) but different SVH
245
286
}
0 commit comments