From b4db9477c2683d7d24c28aef6387e8c75b7641cf Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Sun, 21 Jan 2018 15:09:37 -0800 Subject: [PATCH] Fix use of unstable library feature Tried compiling with rust nightly (1/21/18) and got the following error: ``` error[E0658]: use of unstable library feature 'ptr_internals': use NonNull instead and consider PhantomData (if you also use #[may_dangle]), Send, and/or Sync (see issue #0) --> /home/hivemind/.cargo/registry/src/github.com-1ecc6299db9ec823/linked_list_allocator-0.4.3/src/hole.rs:1:5 | 1 | use core::ptr::Unique; | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(ptr_internals)] to the crate attributes to enable ``` The proposed fix should turn off this warning, but goes against the advice presented in the error to use NonNull and PhantomData. --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index f9fce29..53562e1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,6 +2,7 @@ #![feature(const_fn)] #![feature(alloc, allocator_api)] #![no_std] +#![feature(ptr_internals)] extern crate alloc;