Amanieu / intrusive-rs

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

use offset_of from memoffset #35

Closed RalfJung closed 5 years ago

RalfJung commented 5 years ago

In particular, this should avoid triggering the various ways in which we try to warn about misusage of mem::zeroed and mem::uninitialized. It also doesn't need a feature gate to use the "right" approach for versions of Rust that do support MaybeUninit.

Minimum Rust version of intrusive-rs seems to be Rust 1.31, so according to https://doc.rust-lang.org/edition-guide/rust-2018/macros/macro-changes.html#macros-with-crate-prefix using the $crate:: prefix for macros should work. memoffset supports Rust 1.25+, so that seems fine as well.

Fixes https://github.com/Amanieu/intrusive-rs/issues/25.

Amanieu commented 5 years ago

Could you re-export the offset_of macro so this doesn't become a breaking change?

RalfJung commented 5 years ago

Done.

Amanieu commented 5 years ago

Thanks!

RalfJung commented 4 years ago

intrusive-collections showed up in the regressions in the crater run for https://github.com/rust-lang/rust/pull/66059; any chance we could get a new release that includes this PR?

Amanieu commented 4 years ago

Done.

RalfJung commented 4 years ago

Thanks!