Skip to content

Commit bffccdd

Browse files
committed
correct import of owned_slice
1 parent 089a388 commit bffccdd

File tree

3 files changed

+6
-13
lines changed

3 files changed

+6
-13
lines changed

compiler/rustc_data_structures/src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
#![feature(allocator_api)]
3030
#![feature(get_mut_unchecked)]
3131
#![feature(lint_reasons)]
32-
#![feature(unwrap_infallible)]#![feature(const_mut_refs)]
32+
#![feature(unwrap_infallible)]
33+
#![feature(const_mut_refs)]
3334
#![feature(const_trait_impl)]
3435
#![feature(strict_provenance)]
3536
#![feature(ptr_alignment_type)]

compiler/rustc_data_structures/src/marker.rs

+2-10
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ cfg_if!(
7272
[rustc_arena::DroplessArena]
7373
[crate::memmap::Mmap]
7474
[crate::profiling::SelfProfiler]
75+
[crate::owned_slice::OwnedSlice]
7576
);
7677

7778
macro_rules! impl_dyn_send {
@@ -98,11 +99,6 @@ cfg_if!(
9899
[indexmap::IndexMap<K, V, S> where K: DynSend, V: DynSend, S: DynSend]
99100
[thin_vec::ThinVec<T> where T: DynSend]
100101
[smallvec::SmallVec<A> where A: smallvec::Array + DynSend]
101-
102-
// We use `Send` here, since they are only used in `Send` situations now.
103-
// In this case we don't need copy or change the codes in `crate::owning_ref`.
104-
[crate::owning_ref::OwningRef<O, T> where O: Send, T: ?Sized + Send]
105-
[crate::owning_ref::OwningRefMut<O, T> where O: Send, T: ?Sized + Send]
106102
);
107103

108104
macro_rules! impls_dyn_sync_neg {
@@ -154,6 +150,7 @@ cfg_if!(
154150
[jobserver_crate::Client]
155151
[crate::memmap::Mmap]
156152
[crate::profiling::SelfProfiler]
153+
[crate::owned_slice::OwnedSlice]
157154
);
158155

159156
macro_rules! impl_dyn_sync {
@@ -184,11 +181,6 @@ cfg_if!(
184181
[indexmap::IndexMap<K, V, S> where K: DynSync, V: DynSync, S: DynSync]
185182
[smallvec::SmallVec<A> where A: smallvec::Array + DynSync]
186183
[thin_vec::ThinVec<T> where T: DynSync]
187-
188-
// We use `Sync` here, since they are only used in `Sync` situations now.
189-
// In this case we don't need copy or change the codes in `crate::owning_ref`.
190-
[crate::owning_ref::OwningRef<O, T> where O: Sync, T: ?Sized + Sync]
191-
[crate::owning_ref::OwningRefMut<O, T> where O: Sync, T: ?Sized + Sync]
192184
);
193185
}
194186
);

compiler/rustc_data_structures/src/owned_slice/tests.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,6 @@ fn drop_drops() {
6969

7070
#[test]
7171
fn send_sync() {
72-
crate::sync::assert_send::<OwnedSlice>();
73-
crate::sync::assert_sync::<OwnedSlice>();
72+
crate::sync::assert_dyn_send::<OwnedSlice>();
73+
crate::sync::assert_dyn_sync::<OwnedSlice>();
7474
}

0 commit comments

Comments
 (0)