about summary refs log tree commit diff
diff options
context:
space:
mode:
authorggomez <guillaume1.gomez@gmail.com>2016-08-29 15:25:17 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2016-08-30 23:19:06 +0200
commitb9eaeb12648e1b26ef86d9efc24f0f456c5d8e2c (patch)
tree90a74fd7b4100d2af8a83305c9841f9ec7922928
parent3401f4ed3daf842138d72b1e53bf29067d82e590 (diff)
downloadrust-b9eaeb12648e1b26ef86d9efc24f0f456c5d8e2c.tar.gz
rust-b9eaeb12648e1b26ef86d9efc24f0f456c5d8e2c.zip
Add E0467 error explanation
-rw-r--r--src/librustc_metadata/diagnostics.rs30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/librustc_metadata/diagnostics.rs b/src/librustc_metadata/diagnostics.rs
index f0652f23a59..5127936b2e2 100644
--- a/src/librustc_metadata/diagnostics.rs
+++ b/src/librustc_metadata/diagnostics.rs
@@ -128,6 +128,35 @@ If you would like to import all exported macros, write `macro_use` with no
 arguments.
 "##,
 
+E0467: r##"
+Macro reexport declarations were empty or malformed.
+
+Erroneous code examples:
+
+```compile_fail,E0467
+#[macro_reexport]                    // error: no macros listed for export
+extern crate macros_for_good;
+
+#[macro_reexport(fun_macro = "foo")] // error: not a macro identifier
+extern crate other_macros_for_good;
+```
+
+This is a syntax error at the level of attribute declarations.
+
+Currently, `macro_reexport` requires at least one macro name to be listed.
+Unlike `macro_use`, listing no names does not reexport all macros from the
+given crate.
+
+Decide which macros you would like to export and list them properly.
+
+These are proper reexport declarations:
+
+```ignore
+#[macro_reexport(some_macro, another_macro)]
+extern crate macros_for_good;
+```
+"##,
+
 }
 
 register_diagnostics! {
@@ -139,7 +168,6 @@ register_diagnostics! {
     E0462, // found staticlib `..` instead of rlib or dylib
     E0464, // multiple matching crates for `..`
     E0465, // multiple .. candidates for `..` found
-    E0467, // bad macro reexport
     E0468, // an `extern crate` loading macros must be at the crate root
     E0469, // imported macro not found
     E0470, // reexported macro not found