6363) ]
6464#![ allow( missing_docs) ]
6565
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} ;
7068use safety:: { ensures, requires} ;
7169
7270#[ cfg( kani) ]
@@ -77,19 +75,12 @@ pub mod simd;
7775
7876// These imports are used for simplifying intra-doc links
7977#[ 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" ) ) ]
8579use crate :: sync:: atomic:: { self , AtomicBool , AtomicI32 , AtomicIsize , AtomicU32 , Ordering } ;
8680
8781#[ stable( feature = "drop_in_place" , since = "1.8.0" ) ]
8882#[ 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" ) ]
9384#[ inline]
9485pub unsafe fn drop_in_place < T : ?Sized > ( to_drop : * mut T ) {
9586 // SAFETY: see `ptr::drop_in_place`
@@ -1039,11 +1030,7 @@ pub const fn unlikely(b: bool) -> bool {
10391030#[ miri:: intrinsic_fallback_is_spec]
10401031#[ inline]
10411032pub 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 }
10471034}
10481035
10491036extern "rust-intrinsic" {
0 commit comments