stop relying on feature(untagged_unions) in stdlib
This commit is contained in:
parent
6a32e794c2
commit
defcd7ff47
|
@ -131,7 +131,7 @@
|
||||||
#![feature(transparent_unions)]
|
#![feature(transparent_unions)]
|
||||||
#![feature(unboxed_closures)]
|
#![feature(unboxed_closures)]
|
||||||
#![feature(unsized_locals)]
|
#![feature(unsized_locals)]
|
||||||
#![feature(untagged_unions)]
|
#![cfg_attr(bootstrap, feature(untagged_unions))]
|
||||||
#![feature(unwind_attributes)]
|
#![feature(unwind_attributes)]
|
||||||
#![feature(variant_count)]
|
#![feature(variant_count)]
|
||||||
#![feature(tbm_target_feature)]
|
#![feature(tbm_target_feature)]
|
||||||
|
|
|
@ -229,6 +229,16 @@ pub(crate) struct FatPtr<T> {
|
||||||
pub(crate) len: usize,
|
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.
|
/// Forms a raw slice from a pointer and a length.
|
||||||
///
|
///
|
||||||
/// The `len` argument is the number of **elements**, not the number of bytes.
|
/// The `len` argument is the number of **elements**, not the number of bytes.
|
||||||
|
|
|
@ -319,7 +319,7 @@
|
||||||
#![feature(unsafe_block_in_unsafe_fn)]
|
#![feature(unsafe_block_in_unsafe_fn)]
|
||||||
#![feature(unsafe_cell_get_mut)]
|
#![feature(unsafe_cell_get_mut)]
|
||||||
#![feature(unsafe_cell_raw_get)]
|
#![feature(unsafe_cell_raw_get)]
|
||||||
#![feature(untagged_unions)]
|
#![cfg_attr(bootstrap, feature(untagged_unions))]
|
||||||
#![feature(unwind_attributes)]
|
#![feature(unwind_attributes)]
|
||||||
#![feature(vec_into_raw_parts)]
|
#![feature(vec_into_raw_parts)]
|
||||||
#![feature(wake_trait)]
|
#![feature(wake_trait)]
|
||||||
|
|
Loading…
Reference in New Issue