Version 0.8.0

Support for const-eval on stable
This commit is contained in:
Gilad Naaman 2022-12-15 20:24:05 +02:00
parent ee4641224f
commit 0fac3ac664
2 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "memoffset" name = "memoffset"
version = "0.7.1" version = "0.8.0"
authors = ["Gilad Naaman <gilad.naaman@gmail.com>"] authors = ["Gilad Naaman <gilad.naaman@gmail.com>"]
description = "offset_of functionality for Rust structs." description = "offset_of functionality for Rust structs."
license = "MIT" license = "MIT"

View File

@ -7,6 +7,7 @@ C-Like `offset_of` functionality for Rust structs.
Introduces the following macros: Introduces the following macros:
* `offset_of!` for obtaining the offset of a member of a struct. * `offset_of!` for obtaining the offset of a member of a struct.
* `offset_of_tuple!` for obtaining the offset of a member of a tuple. (Requires Rust 1.20+) * `offset_of_tuple!` for obtaining the offset of a member of a tuple. (Requires Rust 1.20+)
* `offset_of_union!` for obtaining the offset of a member of a union.
* `span_of!` for obtaining the range that a field, or fields, span. * `span_of!` for obtaining the range that a field, or fields, span.
`memoffset` works under `no_std` environments. `memoffset` works under `no_std` environments.
@ -16,7 +17,7 @@ Add the following dependency to your `Cargo.toml`:
```toml ```toml
[dependencies] [dependencies]
memoffset = "0.7" memoffset = "0.8"
``` ```
These versions will compile fine with rustc versions greater or equal to 1.19. These versions will compile fine with rustc versions greater or equal to 1.19.
@ -66,7 +67,7 @@ Do note that `unstable_const` is an unstable feature that is set to be removed i
Cargo.toml: Cargo.toml:
```toml ```toml
[dependencies.memoffset] [dependencies.memoffset]
version = "0.7" version = "0.8"
features = ["unstable_const"] features = ["unstable_const"]
``` ```