Skip to content

Commit 51eb842

Browse files
committed
Make parallel! an expression
1 parent 26089ba commit 51eb842

File tree

1 file changed

+2
-2
lines changed
  • compiler/rustc_data_structures/src

1 file changed

+2
-2
lines changed

compiler/rustc_data_structures/src/sync.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ cfg_if! {
203203

204204
#[macro_export]
205205
macro_rules! parallel {
206-
($($blocks:block),*) => {
206+
($($blocks:block),*) => {{
207207
// We catch panics here ensuring that all the blocks execute.
208208
// This makes behavior consistent with the parallel compiler.
209209
let mut panic = None;
@@ -219,7 +219,7 @@ cfg_if! {
219219
if let Some(panic) = panic {
220220
::std::panic::resume_unwind(panic);
221221
}
222-
}
222+
}}
223223
}
224224

225225
pub fn par_for_each_in<T: IntoIterator>(t: T, mut for_each: impl FnMut(T::Item) + Sync + Send) {

0 commit comments

Comments
 (0)