diff options
| author | SparrowLii <liyuan179@huawei.com> | 2023-04-10 09:53:50 +0800 |
|---|---|---|
| committer | SparrowLii <liyuan179@huawei.com> | 2023-05-06 09:34:55 +0800 |
| commit | bffccddac3470f68efe15a3e81257869be562568 (patch) | |
| tree | 78d3a390f37b3055d1dbb19a2f63a9b5e1808cfc /compiler/rustc_data_structures | |
| parent | 089a38880b6e3b05a2c59644469233dbda411158 (diff) | |
| download | rust-bffccddac3470f68efe15a3e81257869be562568.tar.gz rust-bffccddac3470f68efe15a3e81257869be562568.zip | |
correct import of owned_slice
Diffstat (limited to 'compiler/rustc_data_structures')
| -rw-r--r-- | compiler/rustc_data_structures/src/lib.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_data_structures/src/marker.rs | 12 | ||||
| -rw-r--r-- | compiler/rustc_data_structures/src/owned_slice/tests.rs | 4 |
3 files changed, 6 insertions, 13 deletions
diff --git a/compiler/rustc_data_structures/src/lib.rs b/compiler/rustc_data_structures/src/lib.rs index f543e0d4a7a..579f54c5f71 100644 --- a/compiler/rustc_data_structures/src/lib.rs +++ b/compiler/rustc_data_structures/src/lib.rs @@ -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)] diff --git a/compiler/rustc_data_structures/src/marker.rs b/compiler/rustc_data_structures/src/marker.rs index 6dad2bac58a..e23a10839ee 100644 --- a/compiler/rustc_data_structures/src/marker.rs +++ b/compiler/rustc_data_structures/src/marker.rs @@ -72,6 +72,7 @@ cfg_if!( [rustc_arena::DroplessArena] [crate::memmap::Mmap] [crate::profiling::SelfProfiler] + [crate::owned_slice::OwnedSlice] ); macro_rules! impl_dyn_send { @@ -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 { @@ -154,6 +150,7 @@ cfg_if!( [jobserver_crate::Client] [crate::memmap::Mmap] [crate::profiling::SelfProfiler] + [crate::owned_slice::OwnedSlice] ); macro_rules! impl_dyn_sync { @@ -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] ); } ); diff --git a/compiler/rustc_data_structures/src/owned_slice/tests.rs b/compiler/rustc_data_structures/src/owned_slice/tests.rs index e715fb55362..e151b8c2de0 100644 --- a/compiler/rustc_data_structures/src/owned_slice/tests.rs +++ b/compiler/rustc_data_structures/src/owned_slice/tests.rs @@ -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>(); } |
