Skip to content

Commit

Permalink
Move CastInPlace behind a feature gate.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarcho committed Mar 27, 2023
1 parent 179dced commit ad6adf1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ extern_crate_std = ["extern_crate_alloc"]
zeroable_maybe_uninit = []
zeroable_atomics = []
min_const_generics = []
wasm_simd = [] # Until >= 1.54.0 is MSRV this is an off-by-default feature.
aarch64_simd = [] # Until >= 1.59.0 is MSRV this is an off-by-default feature.

# Off-by-default while bytemuck's MSRV is raised.
wasm_simd = [] # Requires MSRV >= 1.54.0.
aarch64_simd = [] # Requires MSRV >= 1.59.0.
unified_cast = [] # Requires MSRV >= 1.65.0.

# Do not use if you can avoid it, because this is unsound.
unsound_ptr_pod_impl = []
Expand All @@ -42,6 +45,7 @@ features = [
"zeroable_atomics",
"min_const_generics",
"wasm_simd",
"unified_cast",
]

[package.metadata.playground]
Expand All @@ -54,4 +58,5 @@ features = [
"zeroable_atomics",
"min_const_generics",
"wasm_simd",
"unified_cast",
]
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ pub use offset_of::*;
mod transparent;
pub use transparent::*;

#[cfg(feature = "unified_cast")]
mod cast;
#[cfg(feature = "unified_cast")]
pub use cast::CastInPlace;

#[cfg(feature = "derive")]
Expand Down

0 comments on commit ad6adf1

Please sign in to comment.