From d0d11c3ceb8c2b3beb04a4319a343d346a270693 Mon Sep 17 00:00:00 2001 From: Congyu Date: Thu, 29 Feb 2024 16:42:13 +0800 Subject: [PATCH] Revert "inline const for offset" This reverts commit 88f3fbc400e2cb60df5b96e0a2fe6337a6ec05e1. --- src/lib.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 74b2171..1ea8d6b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,3 @@ -#![feature(inline_const)] use std::{ marker::PhantomData, mem::{offset_of, MaybeUninit}, @@ -282,14 +281,14 @@ impl ListHead { #[inline(always)] unsafe fn inner(&self) -> &Inner { &*(ptr::from_ref(self) - .byte_offset(const { Self::offset() }) + .byte_offset(Self::offset()) .cast::>()) } #[inline(always)] unsafe fn inner_mut(&mut self) -> &mut Inner { &mut *(ptr::from_mut(self) - .byte_offset(const { Self::offset() }) + .byte_offset(Self::offset()) .cast::>()) }