Skip to content

Commit 099bc04

Browse files
committed
Remove deprecated FromBytes::(mut_)slice_from items
These are causing PMEs in the presence of `-C link-dead-code`, which casues them to be monomorphized for `Self = ()`, thus producing the problematic ZSTy DST `[()]`. Ref rust-lang/rust#131793 Fixes #1867
1 parent c5fb5aa commit 099bc04

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

src/lib.rs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4544,17 +4544,6 @@ pub unsafe trait FromBytes: FromZeros {
45444544
Self::mut_from_bytes(source).ok()
45454545
}
45464546

4547-
#[deprecated(since = "0.8.0", note = "`FromBytes::ref_from_bytes` now supports slices")]
4548-
#[doc(hidden)]
4549-
#[must_use = "has no side effects"]
4550-
#[inline(always)]
4551-
fn slice_from(source: &[u8]) -> Option<&[Self]>
4552-
where
4553-
Self: Sized + Immutable,
4554-
{
4555-
<[Self]>::ref_from_bytes(source).ok()
4556-
}
4557-
45584547
#[deprecated(since = "0.8.0", note = "renamed to `FromBytes::ref_from_prefix_with_elems`")]
45594548
#[doc(hidden)]
45604549
#[must_use = "has no side effects"]
@@ -4577,17 +4566,6 @@ pub unsafe trait FromBytes: FromZeros {
45774566
<[Self]>::ref_from_suffix_with_elems(source, count).ok()
45784567
}
45794568

4580-
#[deprecated(since = "0.8.0", note = "`FromBytes::mut_from_bytes` now supports slices")]
4581-
#[must_use = "has no side effects"]
4582-
#[doc(hidden)]
4583-
#[inline(always)]
4584-
fn mut_slice_from(source: &mut [u8]) -> Option<&mut [Self]>
4585-
where
4586-
Self: Sized + IntoBytes,
4587-
{
4588-
<[Self]>::mut_from_bytes(source).ok()
4589-
}
4590-
45914569
#[deprecated(since = "0.8.0", note = "renamed to `FromBytes::mut_from_prefix_with_elems`")]
45924570
#[doc(hidden)]
45934571
#[must_use = "has no side effects"]

0 commit comments

Comments
 (0)