We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 18d855b + cf5bd26 commit 05dfabaCopy full SHA for 05dfaba
library/core/src/alloc/layout.rs
@@ -4,6 +4,12 @@ use crate::mem;
4
use crate::num::NonZeroUsize;
5
use crate::ptr::NonNull;
6
7
+// While this function is used in one place and its implementation
8
+// could be inlined, the previous attempts to do so made rustc
9
+// slower:
10
+//
11
+// * https://github.com/rust-lang/rust/pull/72189
12
+// * https://github.com/rust-lang/rust/pull/79827
13
const fn size_align<T>() -> (usize, usize) {
14
(mem::size_of::<T>(), mem::align_of::<T>())
15
}
0 commit comments