From 5874b09806e40e4791ab8d50d956fedcca9df91d Mon Sep 17 00:00:00 2001 From: Christian Poveda Date: Mon, 25 Apr 2022 23:17:32 +0200 Subject: [PATCH] fix formatting --- compiler/rustc_macros/src/session_diagnostic.rs | 4 +--- compiler/rustc_session/src/session.rs | 6 +----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/compiler/rustc_macros/src/session_diagnostic.rs b/compiler/rustc_macros/src/session_diagnostic.rs index 5661451f5207..9466d0f34bc0 100644 --- a/compiler/rustc_macros/src/session_diagnostic.rs +++ b/compiler/rustc_macros/src/session_diagnostic.rs @@ -119,9 +119,7 @@ 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)); }}; diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index 2bc0c5f1228e..e8279f6fed24 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -783,11 +783,7 @@ impl Session { Path::new(&rustlib_path), Path::new("bin"), ]); - if self_contained { - vec![p.clone(), p.join("self-contained")] - } else { - vec![p] - } + if self_contained { vec![p.clone(), p.join("self-contained")] } else { vec![p] } } pub fn init_incr_comp_session(