about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Poveda <git@pvdrz.com>2022-04-25 23:17:32 +0200
committerChristian Poveda <git@pvdrz.com>2022-04-25 23:17:32 +0200
commit5874b09806e40e4791ab8d50d956fedcca9df91d (patch)
tree1653dfddf6dce8e9a0d00c09f3be622ffc36bcfd
parentd6da5fb3532bd44f3baa6eff0011bd20c6323e6b (diff)
downloadrust-5874b09806e40e4791ab8d50d956fedcca9df91d.tar.gz
rust-5874b09806e40e4791ab8d50d956fedcca9df91d.zip
fix formatting
-rw-r--r--compiler/rustc_macros/src/session_diagnostic.rs4
-rw-r--r--compiler/rustc_session/src/session.rs6
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 5661451f520..9466d0f34bc 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 2bc0c5f1228..e8279f6fed2 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(