We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6d25dc commit 50628b7Copy full SHA for 50628b7
src/librustc_mir/hair/pattern/mod.rs
@@ -1104,9 +1104,10 @@ pub fn compare_const_vals<'a, 'tcx>(
1104
defined: defined_b,
1105
},
1106
))
1107
- ) if size_a == size_b && defined_a == defined_b &&
+ ) if size_a == size_b &&
1108
ptr_a.offset.bytes() == 0 && ptr_b.offset.bytes() == 0 &&
1109
- tcx.data_layout.pointer_size.bits() == defined_a.into() => {
+ tcx.data_layout.pointer_size.bits() <= defined_a.into() &&
1110
+ tcx.data_layout.pointer_size.bits() <= defined_b.into() => {
1111
let map = tcx.alloc_map.lock();
1112
let alloc_a = map.unwrap_memory(ptr_a.alloc_id);
1113
let alloc_b = map.unwrap_memory(ptr_b.alloc_id);
0 commit comments