Skip to content

Commit

Permalink
correct import of owned_slice
Browse files Browse the repository at this point in the history
  • Loading branch information
SparrowLii committed May 6, 2023
1 parent 089a388 commit bffccdd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
3 changes: 2 additions & 1 deletion compiler/rustc_data_structures/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
#![feature(allocator_api)]
#![feature(get_mut_unchecked)]
#![feature(lint_reasons)]
#![feature(unwrap_infallible)]#![feature(const_mut_refs)]
#![feature(unwrap_infallible)]
#![feature(const_mut_refs)]
#![feature(const_trait_impl)]
#![feature(strict_provenance)]
#![feature(ptr_alignment_type)]
Expand Down
12 changes: 2 additions & 10 deletions compiler/rustc_data_structures/src/marker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ cfg_if!(
[rustc_arena::DroplessArena]
[crate::memmap::Mmap]
[crate::profiling::SelfProfiler]
[crate::owned_slice::OwnedSlice]
);

macro_rules! impl_dyn_send {
Expand All @@ -98,11 +99,6 @@ cfg_if!(
[indexmap::IndexMap<K, V, S> where K: DynSend, V: DynSend, S: DynSend]
[thin_vec::ThinVec<T> where T: DynSend]
[smallvec::SmallVec<A> where A: smallvec::Array + DynSend]

// We use `Send` here, since they are only used in `Send` situations now.
// In this case we don't need copy or change the codes in `crate::owning_ref`.
[crate::owning_ref::OwningRef<O, T> where O: Send, T: ?Sized + Send]
[crate::owning_ref::OwningRefMut<O, T> where O: Send, T: ?Sized + Send]
);

macro_rules! impls_dyn_sync_neg {
Expand Down Expand Up @@ -154,6 +150,7 @@ cfg_if!(
[jobserver_crate::Client]
[crate::memmap::Mmap]
[crate::profiling::SelfProfiler]
[crate::owned_slice::OwnedSlice]
);

macro_rules! impl_dyn_sync {
Expand Down Expand Up @@ -184,11 +181,6 @@ cfg_if!(
[indexmap::IndexMap<K, V, S> where K: DynSync, V: DynSync, S: DynSync]
[smallvec::SmallVec<A> where A: smallvec::Array + DynSync]
[thin_vec::ThinVec<T> where T: DynSync]

// We use `Sync` here, since they are only used in `Sync` situations now.
// In this case we don't need copy or change the codes in `crate::owning_ref`.
[crate::owning_ref::OwningRef<O, T> where O: Sync, T: ?Sized + Sync]
[crate::owning_ref::OwningRefMut<O, T> where O: Sync, T: ?Sized + Sync]
);
}
);
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_data_structures/src/owned_slice/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@ fn drop_drops() {

#[test]
fn send_sync() {
crate::sync::assert_send::<OwnedSlice>();
crate::sync::assert_sync::<OwnedSlice>();
crate::sync::assert_dyn_send::<OwnedSlice>();
crate::sync::assert_dyn_sync::<OwnedSlice>();
}

0 comments on commit bffccdd

Please sign in to comment.