@@ -987,6 +987,7 @@ pub const unsafe fn assume(b: bool) {
987987#[ unstable( feature = "core_intrinsics" ,  issue = "none" ) ]  
988988#[ rustc_intrinsic]  
989989#[ rustc_nounwind]  
990+ #[ cfg_attr( not( bootstrap) ,  miri:: intrinsic_fallback_checks_ub) ]  
990991pub  const  fn  likely ( b :  bool )  -> bool  { 
991992    b
992993} 
@@ -1006,6 +1007,7 @@ pub const fn likely(b: bool) -> bool {
10061007#[ unstable( feature = "core_intrinsics" ,  issue = "none" ) ]  
10071008#[ rustc_intrinsic]  
10081009#[ rustc_nounwind]  
1010+ #[ cfg_attr( not( bootstrap) ,  miri:: intrinsic_fallback_checks_ub) ]  
10091011pub  const  fn  unlikely ( b :  bool )  -> bool  { 
10101012    b
10111013} 
@@ -2469,6 +2471,7 @@ extern "rust-intrinsic" {
24692471#[ rustc_nounwind]  
24702472#[ rustc_do_not_const_check]  
24712473#[ inline]  
2474+ #[ cfg_attr( not( bootstrap) ,  miri:: intrinsic_fallback_checks_ub) ]  
24722475pub  const  fn  ptr_guaranteed_cmp < T > ( ptr :  * const  T ,  other :  * const  T )  -> u8  { 
24732476    ( ptr == other)  as  u8 
24742477} 
@@ -2733,8 +2736,10 @@ pub const fn ub_checks() -> bool {
27332736#[ unstable( feature = "core_intrinsics" ,  issue = "none" ) ]  
27342737#[ rustc_nounwind]  
27352738#[ rustc_intrinsic]  
2739+ #[ cfg_attr( not( bootstrap) ,  miri:: intrinsic_fallback_checks_ub) ]  
27362740pub  const  unsafe  fn  const_allocate ( _size :  usize ,  _align :  usize )  -> * mut  u8  { 
2737-     // const eval overrides this function, but runtime code should always just return null pointers. 
2741+     // const eval overrides this function, but runtime code for now just returns null pointers. 
2742+     // See <https://github.com/rust-lang/rust/issues/93935>. 
27382743    crate :: ptr:: null_mut ( ) 
27392744} 
27402745
@@ -2752,7 +2757,10 @@ pub const unsafe fn const_allocate(_size: usize, _align: usize) -> *mut u8 {
27522757#[ unstable( feature = "core_intrinsics" ,  issue = "none" ) ]  
27532758#[ rustc_nounwind]  
27542759#[ rustc_intrinsic]  
2755- pub  const  unsafe  fn  const_deallocate ( _ptr :  * mut  u8 ,  _size :  usize ,  _align :  usize )  { } 
2760+ #[ cfg_attr( not( bootstrap) ,  miri:: intrinsic_fallback_checks_ub) ]  
2761+ pub  const  unsafe  fn  const_deallocate ( _ptr :  * mut  u8 ,  _size :  usize ,  _align :  usize )  { 
2762+     // Runtime NOP 
2763+ } 
27562764
27572765/// `ptr` must point to a vtable. 
27582766/// The intrinsic will return the size stored in that vtable. 
0 commit comments