diff options
| author | Matthew Jasper <mjjasper1@gmail.com> | 2023-05-05 12:54:58 +0100 |
|---|---|---|
| committer | Matthew Jasper <mjjasper1@gmail.com> | 2023-05-05 16:19:18 +0100 |
| commit | bd928a0b5e144b0fafb2f4659a83aa362de7e3c7 (patch) | |
| tree | 513fc04e72ed87cdff16d8c991cc4e089edf16e8 /compiler/rustc_data_structures | |
| parent | dd9a7bf848e412c81e3045245acbd5a01641a610 (diff) | |
| download | rust-bd928a0b5e144b0fafb2f4659a83aa362de7e3c7.tar.gz rust-bd928a0b5e144b0fafb2f4659a83aa362de7e3c7.zip | |
Disallow (min) specialization imps with no items
Such implementations are usually mistakes and are not used in the compiler or standard library (after this commit) so forbid them with `min_specialization`.
Diffstat (limited to 'compiler/rustc_data_structures')
| -rw-r--r-- | compiler/rustc_data_structures/src/owned_slice.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_data_structures/src/owned_slice.rs b/compiler/rustc_data_structures/src/owned_slice.rs index 048401f66c2..311a42aa42a 100644 --- a/compiler/rustc_data_structures/src/owned_slice.rs +++ b/compiler/rustc_data_structures/src/owned_slice.rs @@ -109,9 +109,11 @@ impl Borrow<[u8]> for OwnedSlice { } // Safety: `OwnedSlice` is conceptually `(&'self.1 [u8], Box<dyn Send + Sync>)`, which is `Send` +#[cfg(parallel_compiler)] unsafe impl Send for OwnedSlice {} // Safety: `OwnedSlice` is conceptually `(&'self.1 [u8], Box<dyn Send + Sync>)`, which is `Sync` +#[cfg(parallel_compiler)] unsafe impl Sync for OwnedSlice {} #[cfg(test)] |
