Skip to content

Conversation

@cmontella
Copy link
Contributor

@cmontella cmontella commented Jan 21, 2018

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<T> (if you also use #[may_dangle]), Send, and/or Sync (see issue #0)
 --> ~/.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.

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<T> (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<T>.
@phil-opp phil-opp merged commit 658e58c into rust-osdev:master Jan 22, 2018
@phil-opp
Copy link
Member

Thanks! I decided to merge it to get the library compiling again. I try to replace the uses of ptr::Unique soon.

@phil-opp
Copy link
Member

I replaced all uses of Unique with mutable references in a4bf336. Published as 0.5.0.

@cmontella
Copy link
Contributor Author

Awesome, thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants