@@ -24,49 +24,49 @@ LL | unsafe { ptr_offset_from(field_ptr, base_ptr as *const u16) }
2424 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ exact_div: 1_isize cannot be divided by 2_isize without remainder
2525
2626error[E0080]: evaluation of constant value failed
27- --> $DIR/offset_from_ub.rs:44 :14
27+ --> $DIR/offset_from_ub.rs:38 :14
2828 |
2929LL | unsafe { ptr_offset_from(ptr2, ptr1) }
3030 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from` called on different pointers without provenance (i.e., without an associated allocation)
3131
3232error[E0080]: evaluation of constant value failed
33- --> $DIR/offset_from_ub.rs:53 :14
33+ --> $DIR/offset_from_ub.rs:47 :14
3434 |
3535LL | unsafe { ptr_offset_from(end_ptr, start_ptr) }
3636 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds `offset_from`: ALLOC0 has size 4, so pointer to 10 bytes starting at offset 0 is out-of-bounds
3737
3838error[E0080]: evaluation of constant value failed
39- --> $DIR/offset_from_ub.rs:62 :14
39+ --> $DIR/offset_from_ub.rs:56 :14
4040 |
4141LL | unsafe { ptr_offset_from(start_ptr, end_ptr) }
4242 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds `offset_from`: ALLOC1 has size 4, so pointer to 10 bytes starting at offset 0 is out-of-bounds
4343
4444error[E0080]: evaluation of constant value failed
45- --> $DIR/offset_from_ub.rs:79 :14
45+ --> $DIR/offset_from_ub.rs:65 :14
4646 |
4747LL | unsafe { ptr_offset_from_unsigned(field_ptr, base_ptr) }
4848 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from_unsigned` called on pointers into different allocations
4949
5050error[E0080]: evaluation of constant value failed
51- --> $DIR/offset_from_ub.rs:86 :14
51+ --> $DIR/offset_from_ub.rs:72 :14
5252 |
5353LL | unsafe { ptr_offset_from(ptr2, ptr1) }
5454 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from` called when first pointer is too far ahead of second
5555
5656error[E0080]: evaluation of constant value failed
57- --> $DIR/offset_from_ub.rs:92 :14
57+ --> $DIR/offset_from_ub.rs:78 :14
5858 |
5959LL | unsafe { ptr_offset_from(ptr1, ptr2) }
6060 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from` called when first pointer is too far before second
6161
6262error[E0080]: evaluation of constant value failed
63- --> $DIR/offset_from_ub.rs:99 :14
63+ --> $DIR/offset_from_ub.rs:85 :14
6464 |
6565LL | unsafe { ptr_offset_from_unsigned(p, p.add(2) ) }
6666 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from_unsigned` called when first pointer has smaller offset than second: 0 < 8
6767
6868error[E0080]: evaluation of constant value failed
69- --> $DIR/offset_from_ub.rs:106 :14
69+ --> $DIR/offset_from_ub.rs:92 :14
7070 |
7171LL | unsafe { ptr_offset_from_unsigned(ptr2, ptr1) }
7272 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from_unsigned` called when first pointer is too far ahead of second
@@ -79,7 +79,7 @@ error[E0080]: evaluation of constant value failed
7979note: inside `std::ptr::const_ptr::<impl *const u8>::offset_from`
8080 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
8181note: inside `OFFSET_VERY_FAR1`
82- --> $DIR/offset_from_ub.rs:115 :14
82+ --> $DIR/offset_from_ub.rs:101 :14
8383 |
8484LL | unsafe { ptr2.offset_from(ptr1) }
8585 | ^^^^^^^^^^^^^^^^^^^^^^
@@ -92,7 +92,7 @@ error[E0080]: evaluation of constant value failed
9292note: inside `std::ptr::const_ptr::<impl *const u8>::offset_from`
9393 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
9494note: inside `OFFSET_VERY_FAR2`
95- --> $DIR/offset_from_ub.rs:121 :14
95+ --> $DIR/offset_from_ub.rs:107 :14
9696 |
9797LL | unsafe { ptr1.offset_from(ptr2.wrapping_offset(1)) }
9898 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0 commit comments