about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthew Jasper <mjjasper1@gmail.com>2019-07-13 10:02:40 +0100
committerMatthew Jasper <mjjasper1@gmail.com>2019-07-13 10:25:57 +0100
commit199931ce910776e6cd035da8cdf1dd81f4d411ba (patch)
tree6b41ed4b0b2bd496c1f085e707c1438c87df2c13
parent313ba7c4d11f52b808f29678b008bb0962f9af91 (diff)
downloadrust-199931ce910776e6cd035da8cdf1dd81f4d411ba.tar.gz
rust-199931ce910776e6cd035da8cdf1dd81f4d411ba.zip
Make `register_[long_]diagnostics` hygienic
-rw-r--r--src/librustc_lint/error_codes.rs2
-rw-r--r--src/librustc_metadata/error_codes.rs2
-rw-r--r--src/librustc_passes/error_codes.rs2
-rw-r--r--src/librustc_plugin/error_codes.rs2
-rw-r--r--src/librustc_resolve/error_codes.rs2
-rw-r--r--src/libsyntax/diagnostics/macros.rs8
-rw-r--r--src/libsyntax_ext/error_codes.rs2
7 files changed, 10 insertions, 10 deletions
diff --git a/src/librustc_lint/error_codes.rs b/src/librustc_lint/error_codes.rs
index 3165673111c..d7c39b780bf 100644
--- a/src/librustc_lint/error_codes.rs
+++ b/src/librustc_lint/error_codes.rs
@@ -1,4 +1,4 @@
-use syntax::{register_diagnostic, register_diagnostics};
+use syntax::register_diagnostics;
 
 register_diagnostics! {
     E0721, // `await` keyword
diff --git a/src/librustc_metadata/error_codes.rs b/src/librustc_metadata/error_codes.rs
index 9ac582ebc42..7c631736591 100644
--- a/src/librustc_metadata/error_codes.rs
+++ b/src/librustc_metadata/error_codes.rs
@@ -1,6 +1,6 @@
 #![allow(non_snake_case)]
 
-use syntax::{register_diagnostic, register_diagnostics, register_long_diagnostics};
+use syntax::{register_diagnostics, register_long_diagnostics};
 
 register_long_diagnostics! {
 E0454: r##"
diff --git a/src/librustc_passes/error_codes.rs b/src/librustc_passes/error_codes.rs
index e3c6b16703a..36ebe5cf455 100644
--- a/src/librustc_passes/error_codes.rs
+++ b/src/librustc_passes/error_codes.rs
@@ -1,6 +1,6 @@
 #![allow(non_snake_case)]
 
-use syntax::{register_diagnostic, register_diagnostics, register_long_diagnostics};
+use syntax::{register_diagnostics, register_long_diagnostics};
 
 register_long_diagnostics! {
 /*
diff --git a/src/librustc_plugin/error_codes.rs b/src/librustc_plugin/error_codes.rs
index 68462bd83ef..9e76f52a111 100644
--- a/src/librustc_plugin/error_codes.rs
+++ b/src/librustc_plugin/error_codes.rs
@@ -1,6 +1,6 @@
 #![allow(non_snake_case)]
 
-use syntax::{register_diagnostic, register_diagnostics, register_long_diagnostics};
+use syntax::{register_diagnostics, register_long_diagnostics};
 
 register_long_diagnostics! {
 
diff --git a/src/librustc_resolve/error_codes.rs b/src/librustc_resolve/error_codes.rs
index 7cd26dce144..15194a5d146 100644
--- a/src/librustc_resolve/error_codes.rs
+++ b/src/librustc_resolve/error_codes.rs
@@ -1,6 +1,6 @@
 #![allow(non_snake_case)]
 
-use syntax::{register_diagnostic, register_diagnostics, register_long_diagnostics};
+use syntax::{register_diagnostics, register_long_diagnostics};
 
 // Error messages for EXXXX errors.  Each message should start and end with a
 // new line, and be wrapped to 80 characters.  In vim you can `:set tw=80` and
diff --git a/src/libsyntax/diagnostics/macros.rs b/src/libsyntax/diagnostics/macros.rs
index 6f7493ad597..b754d083376 100644
--- a/src/libsyntax/diagnostics/macros.rs
+++ b/src/libsyntax/diagnostics/macros.rs
@@ -170,19 +170,19 @@ macro_rules! help {
 #[macro_export]
 macro_rules! register_diagnostics {
     ($($code:tt),*) => (
-        $(register_diagnostic! { $code })*
+        $($crate::register_diagnostic! { $code })*
     );
     ($($code:tt),*,) => (
-        $(register_diagnostic! { $code })*
+        $($crate::register_diagnostic! { $code })*
     )
 }
 
 #[macro_export]
 macro_rules! register_long_diagnostics {
     ($($code:tt: $description:tt),*) => (
-        $(register_diagnostic! { $code, $description })*
+        $($crate::register_diagnostic! { $code, $description })*
     );
     ($($code:tt: $description:tt),*,) => (
-        $(register_diagnostic! { $code, $description })*
+        $($crate::register_diagnostic! { $code, $description })*
     )
 }
diff --git a/src/libsyntax_ext/error_codes.rs b/src/libsyntax_ext/error_codes.rs
index 9bbd9fdec17..9ec551b4395 100644
--- a/src/libsyntax_ext/error_codes.rs
+++ b/src/libsyntax_ext/error_codes.rs
@@ -1,6 +1,6 @@
 #![allow(non_snake_case)]
 
-use syntax::{register_diagnostic, register_long_diagnostics};
+use syntax::register_long_diagnostics;
 
 // Error messages for EXXXX errors.
 // Each message should start and end with a new line, and be wrapped to 80 characters.