Make register_[long_]diagnostics hygienic

This commit is contained in:
Matthew Jasper 2019-07-13 10:02:40 +01:00
parent 313ba7c4d1
commit 199931ce91
7 changed files with 10 additions and 10 deletions

View file

@ -1,4 +1,4 @@
use syntax::{register_diagnostic, register_diagnostics};
use syntax::register_diagnostics;
register_diagnostics! {
E0721, // `await` keyword

View file

@ -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##"

View file

@ -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! {
/*

View file

@ -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! {

View file

@ -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

View file

@ -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 })*
)
}

View file

@ -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.