We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 725c9a6 commit 96fb8a7Copy full SHA for 96fb8a7
tests/pass/zero-sized-accesses-and-offsets.rs
@@ -39,8 +39,6 @@ fn test_ptr(ptr: *mut ()) {
39
// Distance.
40
let ptr = ptr.cast::<i32>();
41
ptr.offset_from(ptr);
42
- /*
43
- FIXME: this is disabled for now as these cases are not yet allowed.
44
// Distance from other "bad" pointers that have the same address, but different provenance. Some
45
// of this is library UB, but we don't want it to be language UB since that would violate
46
// provenance monotonicity: if we allow computing the distance between two ptrs with no
@@ -54,6 +52,5 @@ fn test_ptr(ptr: *mut ()) {
54
52
// - Distance from use-after-free pointer
55
53
drop(b);
56
ptr.offset_from(other_ptr.with_addr(ptr.addr()));
57
- */
58
}
59
0 commit comments