63
63
) ]
64
64
#![ allow( missing_docs) ]
65
65
66
- use crate :: marker:: DiscriminantKind ;
67
- use crate :: marker:: Tuple ;
68
- use crate :: ptr;
69
- use crate :: ub_checks;
66
+ use crate :: marker:: { DiscriminantKind , Tuple } ;
67
+ use crate :: { ptr, ub_checks} ;
70
68
use safety:: { ensures, requires} ;
71
69
72
70
#[ cfg( kani) ]
@@ -77,19 +75,12 @@ pub mod simd;
77
75
78
76
// These imports are used for simplifying intra-doc links
79
77
#[ allow( unused_imports) ]
80
- #[ cfg( all(
81
- target_has_atomic = "8" ,
82
- target_has_atomic = "32" ,
83
- target_has_atomic = "ptr"
84
- ) ) ]
78
+ #[ cfg( all( target_has_atomic = "8" , target_has_atomic = "32" , target_has_atomic = "ptr" ) ) ]
85
79
use crate :: sync:: atomic:: { self , AtomicBool , AtomicI32 , AtomicIsize , AtomicU32 , Ordering } ;
86
80
87
81
#[ stable( feature = "drop_in_place" , since = "1.8.0" ) ]
88
82
#[ rustc_allowed_through_unstable_modules]
89
- #[ deprecated(
90
- note = "no longer an intrinsic - use `ptr::drop_in_place` directly" ,
91
- since = "1.52.0"
92
- ) ]
83
+ #[ deprecated( note = "no longer an intrinsic - use `ptr::drop_in_place` directly" , since = "1.52.0" ) ]
93
84
#[ inline]
94
85
pub unsafe fn drop_in_place < T : ?Sized > ( to_drop : * mut T ) {
95
86
// SAFETY: see `ptr::drop_in_place`
@@ -1039,11 +1030,7 @@ pub const fn unlikely(b: bool) -> bool {
1039
1030
#[ miri:: intrinsic_fallback_is_spec]
1040
1031
#[ inline]
1041
1032
pub fn select_unpredictable < T > ( b : bool , true_val : T , false_val : T ) -> T {
1042
- if b {
1043
- true_val
1044
- } else {
1045
- false_val
1046
- }
1033
+ if b { true_val } else { false_val }
1047
1034
}
1048
1035
1049
1036
extern "rust-intrinsic" {
0 commit comments