diff options
| author | bors <bors@rust-lang.org> | 2017-06-01 05:24:11 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-06-01 05:24:11 +0000 |
| commit | 38efb2e1ccf210b0108d2b88ee9d4ddcd8e91a3a (patch) | |
| tree | fd62a4e7688baa1ef79d4d4ac559f487d64903e4 /src/libsyntax/diagnostics | |
| parent | e0cc22b4bae8007c59fbe58f2c104ecd743d746a (diff) | |
| parent | 9bd6dc73fc7fd46bf83ff17bea13a410efb1fc96 (diff) | |
| download | rust-38efb2e1ccf210b0108d2b88ee9d4ddcd8e91a3a.tar.gz rust-38efb2e1ccf210b0108d2b88ee9d4ddcd8e91a3a.zip | |
Auto merge of #42348 - frewsxcv:rollup, r=frewsxcv
Rollup of 9 pull requests - Successful merges: #42136, #42275, #42286, #42297, #42302, #42306, #42314, #42324, #42347 - Failed merges:
Diffstat (limited to 'src/libsyntax/diagnostics')
| -rw-r--r-- | src/libsyntax/diagnostics/macros.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libsyntax/diagnostics/macros.rs b/src/libsyntax/diagnostics/macros.rs index 25e0428248d..13016d72127 100644 --- a/src/libsyntax/diagnostics/macros.rs +++ b/src/libsyntax/diagnostics/macros.rs @@ -39,6 +39,14 @@ macro_rules! span_warn { } #[macro_export] +macro_rules! struct_err { + ($session:expr, $code:ident, $($message:tt)*) => ({ + __diagnostic_used!($code); + $session.struct_err_with_code(&format!($($message)*), stringify!($code)) + }) +} + +#[macro_export] macro_rules! span_err_or_warn { ($is_warning:expr, $session:expr, $span:expr, $code:ident, $($message:tt)*) => ({ __diagnostic_used!($code); |
