stop relying on feature(untagged_unions) in stdlib
This commit is contained in:
parent
6a32e794c2
commit
defcd7ff47
3 changed files with 12 additions and 2 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue