@@ -2513,9 +2513,7 @@ extern "rust-intrinsic" {
2513
2513
/// use std::hint::unreachable_unchecked;
2514
2514
/// use std::intrinsics::is_val_statically_known;
2515
2515
///
2516
- /// unsafe {
2517
- /// if !is_val_statically_known(0) { unreachable_unchecked(); }
2518
- /// }
2516
+ /// if !is_val_statically_known(0) { unsafe { unreachable_unchecked(); } }
2519
2517
/// ```
2520
2518
///
2521
2519
/// This also means that the following code's behavior is unspecified; it
@@ -2527,9 +2525,7 @@ extern "rust-intrinsic" {
2527
2525
/// # #![allow(internal_features)]
2528
2526
/// use std::intrinsics::is_val_statically_known;
2529
2527
///
2530
- /// unsafe {
2531
- /// assert_eq!(is_val_statically_known(0), is_val_statically_known(0));
2532
- /// }
2528
+ /// assert_eq!(is_val_statically_known(0), is_val_statically_known(0));
2533
2529
/// ```
2534
2530
///
2535
2531
/// Unsafe code may not rely on `is_val_statically_known` returning any
@@ -2544,7 +2540,7 @@ extern "rust-intrinsic" {
2544
2540
#[ rustc_nounwind]
2545
2541
#[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
2546
2542
#[ cfg_attr( not( bootstrap) , rustc_intrinsic) ]
2547
- pub const unsafe fn is_val_statically_known < T : Copy > ( _arg : T ) -> bool {
2543
+ pub const fn is_val_statically_known < T : Copy > ( _arg : T ) -> bool {
2548
2544
false
2549
2545
}
2550
2546
@@ -2564,7 +2560,7 @@ pub const unsafe fn is_val_statically_known<T: Copy>(_arg: T) -> bool {
2564
2560
#[ rustc_const_unstable( feature = "delayed_debug_assertions" , issue = "none" ) ]
2565
2561
#[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
2566
2562
#[ cfg_attr( not( bootstrap) , rustc_intrinsic) ]
2567
- pub ( crate ) const unsafe fn debug_assertions ( ) -> bool {
2563
+ pub ( crate ) const fn debug_assertions ( ) -> bool {
2568
2564
cfg ! ( debug_assertions)
2569
2565
}
2570
2566
0 commit comments