Skip to content

Commit

Permalink
Use $crate
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoxc committed Jan 16, 2020
1 parent 69276ba commit 934abf2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/librustc_data_structures/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,11 @@ cfg_if! {
($($blocks:tt),*) => {
// We catch panics here ensuring that all the blocks execute.
// This makes behavior consistent with the parallel compiler.
let panic = ::rustc_data_structures::sync::Lock::new(None);
let panic = $crate::sync::Lock::new(None);
$(
::rustc_data_structures::sync::catch(&panic, || $blocks);
$crate::sync::catch(&panic, || $blocks);
)*
::rustc_data_structures::sync::resume(panic);
$crate::sync::resume(panic);
}
}

Expand Down Expand Up @@ -383,7 +383,7 @@ cfg_if! {
parallel!(impl $fblock [$block, $($c,)*] [$($rest),*])
};
(impl $fblock:tt [$($blocks:tt,)*] []) => {
::rustc_data_structures::sync::scope(|s| {
$crate::sync::scope(|s| {
$(
s.spawn(|_| $blocks);
)*
Expand Down Expand Up @@ -445,7 +445,7 @@ cfg_if! {
macro_rules! rustc_erase_owner {
($v:expr) => {{
let v = $v;
::rustc_data_structures::sync::assert_send_val(&v);
$crate::sync::assert_send_val(&v);
v.erase_send_sync_owner()
}}
}
Expand Down

0 comments on commit 934abf2

Please sign in to comment.