Skip to content

Commit 6bfb876

Browse files
committed
Implement DynSend and DynSync for std::panic::Location.
Required to allow the compiler to build with the debug_refcell stdlib cargo feature.
1 parent 5f666a6 commit 6bfb876

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler/rustc_data_structures/src/marker.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ impl !DynSend for std::env::VarsOs {}
5353

5454
macro_rules! already_send {
5555
($([$ty: ty])*) => {
56-
$(unsafe impl DynSend for $ty where $ty: Send {})*
56+
$(unsafe impl DynSend for $ty where Self: Send {})*
5757
};
5858
}
5959

6060
// These structures are already `Send`.
6161
already_send!(
62-
[std::backtrace::Backtrace][std::io::Stdout][std::io::Stderr][std::io::Error][std::fs::File]
62+
[std::backtrace::Backtrace][std::io::Stdout][std::io::Stderr][std::io::Error][std::fs::File][std::panic::Location<'_>]
6363
[rustc_arena::DroplessArena][jobserver_crate::Client][jobserver_crate::HelperThread]
6464
[crate::memmap::Mmap][crate::profiling::SelfProfiler][crate::owned_slice::OwnedSlice]
6565
);
@@ -127,14 +127,14 @@ impl !DynSync for std::env::VarsOs {}
127127

128128
macro_rules! already_sync {
129129
($([$ty: ty])*) => {
130-
$(unsafe impl DynSync for $ty where $ty: Sync {})*
130+
$(unsafe impl DynSync for $ty where Self: Sync {})*
131131
};
132132
}
133133

134134
// These structures are already `Sync`.
135135
already_sync!(
136136
[std::sync::atomic::AtomicBool][std::sync::atomic::AtomicUsize][std::sync::atomic::AtomicU8]
137-
[std::sync::atomic::AtomicU32][std::backtrace::Backtrace][std::io::Error][std::fs::File]
137+
[std::sync::atomic::AtomicU32][std::backtrace::Backtrace][std::io::Error][std::fs::File][std::panic::Location<'_>]
138138
[jobserver_crate::Client][jobserver_crate::HelperThread][crate::memmap::Mmap]
139139
[crate::profiling::SelfProfiler][crate::owned_slice::OwnedSlice]
140140
);

0 commit comments

Comments
 (0)