We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24d932d commit 88f3fbcCopy full SHA for 88f3fbc
src/lib.rs
@@ -1,3 +1,4 @@
1
+#![feature(inline_const)]
2
use std::{
3
marker::PhantomData,
4
mem::{offset_of, MaybeUninit},
@@ -281,14 +282,14 @@ impl<T> ListHead<T> {
281
282
#[inline(always)]
283
unsafe fn inner(&self) -> &Inner<T> {
284
&*(ptr::from_ref(self)
- .byte_offset(Self::offset())
285
+ .byte_offset(const { Self::offset() })
286
.cast::<Inner<T>>())
287
}
288
289
290
unsafe fn inner_mut(&mut self) -> &mut Inner<T> {
291
&mut *(ptr::from_mut(self)
292
293
294
295
0 commit comments