We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 72f0e0e commit 8561618Copy full SHA for 8561618
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