mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Just pass Layout directly to box_new_uninit
We have a constant for it already (used in `RawVec` for basically the same polymorphization) so let's use it. Conveniently, it can even be safe that way!
This commit is contained in:
@@ -45,8 +45,6 @@ pub fn foo2() -> Box<dyn TestTrait2> {
|
||||
//~ MONO_ITEM fn foo2
|
||||
//~ MONO_ITEM fn std::alloc::Global::alloc_impl_runtime
|
||||
//~ MONO_ITEM fn std::boxed::Box::<TestStruct2>::new
|
||||
//~ MONO_ITEM fn std::alloc::Layout::from_size_align_unchecked::precondition_check
|
||||
//~ MONO_ITEM fn std::ptr::Alignment::new_unchecked::precondition_check
|
||||
//~ MONO_ITEM fn std::ptr::NonNull::<T>::new_unchecked::precondition_check
|
||||
|
||||
struct Counter {
|
||||
|
||||
Reference in New Issue
Block a user