From d522a622a3000be6f264f955d4e8bc820a318cbc Mon Sep 17 00:00:00 2001 From: Congyu Date: Sun, 3 Mar 2024 12:35:47 +0800 Subject: [PATCH] comment on inline const fn offset() --- src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 1ea8d6b..d9e8910 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -292,6 +292,8 @@ impl ListHead { .cast::>()) } + /// The compiler will compile this into a inlined constant + /// even without inline const feature. #[inline(always)] const fn offset() -> isize { -(offset_of!(Inner, list) as isize)