1
Fork 0

stop relying on feature(untagged_unions) in stdlib

This commit is contained in:
Ralf Jung 2020-10-05 09:20:39 +02:00
parent 6a32e794c2
commit defcd7ff47
3 changed files with 12 additions and 2 deletions

View file

@ -229,6 +229,16 @@ pub(crate) struct FatPtr<T> {
pub(crate) len: usize,
}
// Manual impl needed to avoid `T: Clone` bound.
impl<T> Clone for FatPtr<T> {
fn clone(&self) -> Self {
*self
}
}
// Manual impl needed to avoid `T: Copy` bound.
impl<T> Copy for FatPtr<T> {}
/// Forms a raw slice from a pointer and a length.
///
/// The `len` argument is the number of **elements**, not the number of bytes.