Skip to content

Commit 199931c

Browse files
committed
Make register_[long_]diagnostics hygienic
1 parent 313ba7c commit 199931c

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

src/librustc_lint/error_codes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use syntax::{register_diagnostic, register_diagnostics};
1+
use syntax::register_diagnostics;
22

33
register_diagnostics! {
44
E0721, // `await` keyword

src/librustc_metadata/error_codes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![allow(non_snake_case)]
22

3-
use syntax::{register_diagnostic, register_diagnostics, register_long_diagnostics};
3+
use syntax::{register_diagnostics, register_long_diagnostics};
44

55
register_long_diagnostics! {
66
E0454: r##"

src/librustc_passes/error_codes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![allow(non_snake_case)]
22

3-
use syntax::{register_diagnostic, register_diagnostics, register_long_diagnostics};
3+
use syntax::{register_diagnostics, register_long_diagnostics};
44

55
register_long_diagnostics! {
66
/*

src/librustc_plugin/error_codes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![allow(non_snake_case)]
22

3-
use syntax::{register_diagnostic, register_diagnostics, register_long_diagnostics};
3+
use syntax::{register_diagnostics, register_long_diagnostics};
44

55
register_long_diagnostics! {
66

src/librustc_resolve/error_codes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![allow(non_snake_case)]
22

3-
use syntax::{register_diagnostic, register_diagnostics, register_long_diagnostics};
3+
use syntax::{register_diagnostics, register_long_diagnostics};
44

55
// Error messages for EXXXX errors. Each message should start and end with a
66
// new line, and be wrapped to 80 characters. In vim you can `:set tw=80` and

src/libsyntax/diagnostics/macros.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -170,19 +170,19 @@ macro_rules! help {
170170
#[macro_export]
171171
macro_rules! register_diagnostics {
172172
($($code:tt),*) => (
173-
$(register_diagnostic! { $code })*
173+
$($crate::register_diagnostic! { $code })*
174174
);
175175
($($code:tt),*,) => (
176-
$(register_diagnostic! { $code })*
176+
$($crate::register_diagnostic! { $code })*
177177
)
178178
}
179179

180180
#[macro_export]
181181
macro_rules! register_long_diagnostics {
182182
($($code:tt: $description:tt),*) => (
183-
$(register_diagnostic! { $code, $description })*
183+
$($crate::register_diagnostic! { $code, $description })*
184184
);
185185
($($code:tt: $description:tt),*,) => (
186-
$(register_diagnostic! { $code, $description })*
186+
$($crate::register_diagnostic! { $code, $description })*
187187
)
188188
}

src/libsyntax_ext/error_codes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![allow(non_snake_case)]
22

3-
use syntax::{register_diagnostic, register_long_diagnostics};
3+
use syntax::register_long_diagnostics;
44

55
// Error messages for EXXXX errors.
66
// Each message should start and end with a new line, and be wrapped to 80 characters.

0 commit comments

Comments
 (0)