Amanieu / intrusive-rs

Intrusive collections for Rust
Apache License 2.0
412 stars 48 forks source link

Compile error at NonZero::new on rust nightly #12

Closed canarysnort01 closed 7 years ago

canarysnort01 commented 7 years ago
 --> intrusive-rs/src/unsafe_ref.rs:41:26
   |
41 |         UnsafeRef { ptr: NonZero::new(val as *mut _) }
   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `core::nonzero::NonZero`, found enum `core::option::Option`
   |
   = note: expected type `core::nonzero::NonZero<*mut T>`
              found type `core::option::Option<core::nonzero::NonZero<*mut _>>`
   = help: here are some functions which might fulfill your needs:
           - .unwrap()
Amanieu commented 7 years ago

Should be fixed in 0.6.5.