diff options
| author | Christian Poveda <git@pvdrz.com> | 2022-04-25 22:53:09 +0200 |
|---|---|---|
| committer | Christian Poveda <git@pvdrz.com> | 2022-04-25 22:54:16 +0200 |
| commit | eb55cdce4bc1c03e1ce805af633dac611a948d43 (patch) | |
| tree | 698491ccbb08c4fa847876d37fe742369a8ca9c7 /compiler/rustc_macros/src | |
| parent | fedbe5dabc815bd710217221bfebad1ff9f37a43 (diff) | |
| download | rust-eb55cdce4bc1c03e1ce805af633dac611a948d43.tar.gz rust-eb55cdce4bc1c03e1ce805af633dac611a948d43.zip | |
use `ParseSess` instead of `Session` in `into_diagnostic`
Diffstat (limited to 'compiler/rustc_macros/src')
| -rw-r--r-- | compiler/rustc_macros/src/session_diagnostic.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_macros/src/session_diagnostic.rs b/compiler/rustc_macros/src/session_diagnostic.rs index ff7506979fc..5661451f520 100644 --- a/compiler/rustc_macros/src/session_diagnostic.rs +++ b/compiler/rustc_macros/src/session_diagnostic.rs @@ -119,7 +119,9 @@ fn span_err(span: impl proc_macro::MultiSpan, msg: &str) -> proc_macro::Diagnost /// Emit a diagnostic on span `$span` with msg `$msg` (optionally performing additional decoration /// using the `FnOnce` passed in `diag`) and return `Err(ErrorHandled)`. macro_rules! throw_span_err { - ($span:expr, $msg:expr) => {{ throw_span_err!($span, $msg, |diag| diag) }}; + ($span:expr, $msg:expr) => {{ + throw_span_err!($span, $msg, |diag| diag) + }}; ($span:expr, $msg:expr, $f:expr) => {{ return Err(_throw_span_err($span, $msg, $f)); }}; @@ -308,7 +310,7 @@ impl<'a> SessionDiagnosticDerive<'a> { { fn into_diagnostic( self, - #sess: &'__session_diagnostic_sess rustc_session::Session + #sess: &'__session_diagnostic_sess rustc_session::parse::ParseSess ) -> rustc_errors::DiagnosticBuilder<'__session_diagnostic_sess, #param_ty> { use rustc_errors::IntoDiagnosticArg; #implementation |
