@@ -917,6 +917,7 @@ fn op_to_prop_const<'tcx>(
917917
918918 // Do not try interning a value that contains provenance.
919919 // Due to https://github.com/rust-lang/rust/issues/79738, doing so could lead to bugs.
920+ // FIXME: remove this hack once that issue is fixed.
920921 let alloc_ref = ecx. get_ptr_alloc ( mplace. ptr ( ) , size) . ok ( ) ??;
921922 if alloc_ref. has_provenance ( ) {
922923 return None ;
@@ -928,6 +929,8 @@ fn op_to_prop_const<'tcx>(
928929 if matches ! ( ecx. tcx. global_alloc( alloc_id) , GlobalAlloc :: Memory ( _) ) {
929930 // `alloc_id` may point to a static. Codegen will choke on an `Indirect` with anything
930931 // by `GlobalAlloc::Memory`, so do fall through to copying if needed.
932+ // FIXME: find a way to treat this more uniformly
933+ // (probably by fixing codegen)
931934 return Some ( ConstValue :: Indirect { alloc_id, offset } ) ;
932935 }
933936 }
@@ -939,7 +942,7 @@ fn op_to_prop_const<'tcx>(
939942
940943 // Check that we do not leak a pointer.
941944 // Those pointers may lose part of their identity in codegen.
942- // See https://github.com/rust-lang/rust/issues/79738.
945+ // FIXME: remove this hack once https://github.com/rust-lang/rust/issues/79738 is fixed .
943946 if ecx. tcx . global_alloc ( alloc_id) . unwrap_memory ( ) . inner ( ) . provenance ( ) . ptrs ( ) . is_empty ( ) {
944947 return Some ( value) ;
945948 }
@@ -969,7 +972,7 @@ impl<'tcx> VnState<'_, 'tcx> {
969972
970973 // Check that we do not leak a pointer.
971974 // Those pointers may lose part of their identity in codegen.
972- // See https://github.com/rust-lang/rust/issues/79738.
975+ // FIXME: remove this hack once https://github.com/rust-lang/rust/issues/79738 is fixed .
973976 assert ! ( !value. may_have_provenance( self . tcx, op. layout. size) ) ;
974977
975978 let const_ = Const :: Val ( value, op. layout . ty ) ;
0 commit comments