Auto merge of #2447 - RalfJung:rustup, r=RalfJung

rustup
This commit is contained in:
bors 2022-07-27 00:39:00 +00:00
commit 530abacbf7
3 changed files with 3 additions and 5 deletions

View File

@ -1 +1 @@
a86705942c4cfaaee60f2e7308ca2bca703a710f
c11207ec89b856164bba03b8ecfe07b0b234ed21

View File

@ -1,5 +1,3 @@
// Preparing for a rustc behavior change that'll happen soon: (FIXME remove this after the next submodule bump succeeded)
//@normalize-stderr-test: "`(ptr_offset_from_unsigned)`" -> "$1"
#![feature(ptr_sub_ptr)]
fn main() {

View File

@ -1,8 +1,8 @@
error: Undefined Behavior: ptr_offset_from_unsigned called when first pointer has smaller offset than second: 0 < 4
error: Undefined Behavior: `ptr_offset_from_unsigned` called when first pointer has smaller offset than second: 0 < 4
--> $DIR/ptr_offset_from_unsigned_neg.rs:LL:CC
|
LL | let _val = unsafe { ptr1.sub_ptr(ptr2) };
| ^^^^^^^^^^^^^^^^^^ ptr_offset_from_unsigned called when first pointer has smaller offset than second: 0 < 4
| ^^^^^^^^^^^^^^^^^^ `ptr_offset_from_unsigned` called when first pointer has smaller offset than second: 0 < 4
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information