diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2023-08-19 17:26:54 +0200 |
|---|---|---|
| committer | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2023-08-30 18:12:18 +0200 |
| commit | 51eb8427bf3887323a77d4dd56bf4557f80fdabc (patch) | |
| tree | cec844d5be6a739093588a8461c4510d2022b3d0 /compiler/rustc_data_structures/src | |
| parent | 26089ba0a2d9dab8381ccb0d7b99e704bc5cb3ed (diff) | |
| download | rust-51eb8427bf3887323a77d4dd56bf4557f80fdabc.tar.gz rust-51eb8427bf3887323a77d4dd56bf4557f80fdabc.zip | |
Make parallel! an expression
Diffstat (limited to 'compiler/rustc_data_structures/src')
| -rw-r--r-- | compiler/rustc_data_structures/src/sync.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_data_structures/src/sync.rs b/compiler/rustc_data_structures/src/sync.rs index 083aa6cf697..c46ae9a65da 100644 --- a/compiler/rustc_data_structures/src/sync.rs +++ b/compiler/rustc_data_structures/src/sync.rs @@ -203,7 +203,7 @@ cfg_if! { #[macro_export] macro_rules! parallel { - ($($blocks:block),*) => { + ($($blocks:block),*) => {{ // We catch panics here ensuring that all the blocks execute. // This makes behavior consistent with the parallel compiler. let mut panic = None; @@ -219,7 +219,7 @@ cfg_if! { if let Some(panic) = panic { ::std::panic::resume_unwind(panic); } - } + }} } pub fn par_for_each_in<T: IntoIterator>(t: T, mut for_each: impl FnMut(T::Item) + Sync + Send) { |
