Amanieu / intrusive-rs

Intrusive collections for Rust
Apache License 2.0
423 stars 50 forks source link

Fails to compile on recent rust nightlies with nightly features enabled #8

Closed canarysnort01 closed 7 years ago

canarysnort01 commented 7 years ago

When included in a project with this configuration:

intrusive-collections = { version = "0.6", features = ["nightly"] }

Compilation fails with the following errors:

error: type `core::nonzero::NonZero<*mut T>` cannot be dereferenced
  --> intrusive-rs/src/unsafe_ref.rs:47:9
   |
47 |         *ptr.ptr
   |         ^^^^^^^^

error: type `core::nonzero::NonZero<*mut T>` cannot be dereferenced
   --> intrusive-rs/src/unsafe_ref.rs:112:20
    |
112 |         unsafe { &**self.ptr }
    |                    ^^^^^^^^^

error: aborting due to 2 previous errors

I believe this is due to the following change in the rust compiler:

rust-lang/rust#41064

Amanieu commented 7 years ago

Thanks, this should be fixed in 0.6.1 now.