File tree Expand file tree Collapse file tree 4 files changed +10
-0
lines changed Expand file tree Collapse file tree 4 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,9 @@ unsound_ptr_pod_impl = []
58
58
# MSRV 1.46.0: adds the `#[track_caller]` attribute to functions which may panic
59
59
track_caller = []
60
60
61
+ # MSRV 1.74.0 Pod/Zeroable implementations for `core::num::Saturating`
62
+ pod_saturating = []
63
+
61
64
# Enables all features that are both sound and supported on the latest stable
62
65
# version of Rust, with the exception of `extern_crate_alloc` and
63
66
# `extern_crate_std`.
@@ -73,6 +76,7 @@ latest_stable_rust = [
73
76
" min_const_generics" ,
74
77
" must_cast" ,
75
78
" must_cast_extra" ,
79
+ " pod_saturating" ,
76
80
" track_caller" ,
77
81
" transparentwrapper_extra" ,
78
82
" wasm_simd" ,
Original file line number Diff line number Diff line change 82
82
//! Box and Vec.
83
83
//! * `zeroable_maybe_uninit` and `zeroable_atomics`: Provide more [`Zeroable`]
84
84
//! impls.
85
+ //! * `pod_saturating`: Provide more [`Pod`] and [`Zeroable`] impls.
85
86
//! * `wasm_simd` and `aarch64_simd`: Support more SIMD types.
86
87
//! * `min_const_generics`: Provides appropriate impls for arrays of all lengths
87
88
//! instead of just for a select list of array lengths.
Original file line number Diff line number Diff line change @@ -57,6 +57,9 @@ unsafe impl Pod for f64 {}
57
57
unsafe impl Pod for f128 { }
58
58
unsafe impl < T : Pod > Pod for Wrapping < T > { }
59
59
60
+ #[ cfg( feature = "pod_saturating" ) ]
61
+ unsafe impl < T : Pod > Pod for core:: num:: Saturating < T > { }
62
+
60
63
#[ cfg( feature = "unsound_ptr_pod_impl" ) ]
61
64
#[ cfg_attr(
62
65
feature = "nightly_docs" ,
Original file line number Diff line number Diff line change @@ -56,6 +56,8 @@ unsafe impl Zeroable for f64 {}
56
56
unsafe impl Zeroable for f128 { }
57
57
unsafe impl < T : Zeroable > Zeroable for Wrapping < T > { }
58
58
unsafe impl < T : Zeroable > Zeroable for core:: cmp:: Reverse < T > { }
59
+ #[ cfg( feature = "pod_saturating" ) ]
60
+ unsafe impl < T : Zeroable > Zeroable for core:: num:: Saturating < T > { }
59
61
60
62
// Note: we can't implement this for all `T: ?Sized` types because it would
61
63
// create NULL pointers for vtables.
You can’t perform that action at this time.
0 commit comments