Skip to content

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

@canarysnort01

Description

@canarysnort01

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions