We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bde946a commit 0547a62Copy full SHA for 0547a62
compiler/rustc_mir_transform/src/gvn.rs
@@ -940,7 +940,7 @@ fn op_to_prop_const<'tcx>(
940
// Check that we do not leak a pointer.
941
// Those pointers may lose part of their identity in codegen.
942
// See https://github.com/rust-lang/rust/issues/79738.
943
- if !value.may_have_provenance(*ecx.tcx, op.layout.size) {
+ if ecx.tcx.global_alloc(alloc_id).unwrap_memory().inner().provenance().ptrs().is_empty() {
944
return Some(value);
945
}
946
0 commit comments