]> git.proxmox.com Git - rustc.git/blobdiff - library/core/src/alloc/layout.rs
New upstream version 1.51.0+dfsg1
[rustc.git] / library / core / src / alloc / layout.rs
index 997c1a16cc0250139c93b8d04a8ef12c4a6a3086..9dc3f05dae5ace8d24419088852b0d16f8c64646 100644 (file)
@@ -4,6 +4,12 @@ use crate::mem;
 use crate::num::NonZeroUsize;
 use crate::ptr::NonNull;
 
+// While this function is used in one place and its implementation
+// could be inlined, the previous attempts to do so made rustc
+// slower:
+//
+// * https://github.com/rust-lang/rust/pull/72189
+// * https://github.com/rust-lang/rust/pull/79827
 const fn size_align<T>() -> (usize, usize) {
     (mem::size_of::<T>(), mem::align_of::<T>())
 }