Auto merge of #79113 - andjo403:raw_vec_ptr, r=m-ou-se
mark raw_vec::ptr with inline when a lot of vectors is used in a enum as in the example in #66617 if this function is not inlined and multiple cgus is used this results in huge compile times. with this fix the compile time is 6s from minutes for the example in #66617. I did not have the patience to wait for it to compile for more then 3 min.
This commit is contained in:
commit
ff6ee2a702
@ -232,6 +232,7 @@ impl<T, A: Allocator> RawVec<T, A> {
|
||||
/// Gets a raw pointer to the start of the allocation. Note that this is
|
||||
/// `Unique::dangling()` if `capacity == 0` or `T` is zero-sized. In the former case, you must
|
||||
/// be careful.
|
||||
#[inline]
|
||||
pub fn ptr(&self) -> *mut T {
|
||||
self.ptr.as_ptr()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user