You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since Rust 1.51.0, support for macro addr_of!() has been stabilized[1],
and this provides a way to get a raw pointer without potential UB in
some cases.
Memoffset alreadly uses the feature at the pre-stablilized stage (the
macro was named as raw_const then). Therefore, switch to use the
stablilized version (and name) and remove the out-dated version, also
remove the related feature gate.
[1]: rust-lang/rust#72279
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Copy file name to clipboardexpand all lines: README.md
+2-3
Original file line number
Diff line number
Diff line change
@@ -75,6 +75,5 @@ Your crate root: (`lib.rs`/`main.rs`)
75
75
If you intend to use `offset_of!` inside a `const fn`, also add the `const_fn` compiler feature.
76
76
77
77
### Raw references ###
78
-
Recent nightlies support [a way to create raw pointers](https://github.com/rust-lang/rust/issues/73394) that avoids creating intermediate safe references.
79
-
`memoffset` can make use of that feature to avoid what is technically Undefined Behavior.
80
-
Use the `unstable_raw` feature to enable this.
78
+
Since Rust 1.51.0, [a way to create raw pointers](https://github.com/rust-lang/rust/issues/73394) that avoids creating intermediate safe references
79
+
has been stablilized, now `memoffset` makes use of that feature to avoid what is technically Undefined Behavior.
0 commit comments