From f1044d2f774b3525ab28372ccd2be30911f2eb29 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 21 Jun 2022 11:42:19 -0700 Subject: [PATCH] Bless stderr files after rustfmt --- tests/fail/box-cell-alias.stderr | 10 +++++----- .../maybe_null_pointer_write_zst.stderr | 4 ++-- tests/fail/intrinsics/copy_null.stderr | 4 ++-- tests/fail/intrinsics/copy_unaligned.stderr | 4 ++-- tests/fail/intrinsics/exact_div1.stderr | 4 ++-- tests/fail/intrinsics/exact_div2.stderr | 4 ++-- tests/fail/intrinsics/exact_div3.stderr | 4 ++-- tests/fail/intrinsics/exact_div4.stderr | 4 ++-- .../intrinsics/float_to_int_32_inf1.stderr | 4 ++-- .../intrinsics/float_to_int_32_infneg1.stderr | 4 ++-- .../fail/intrinsics/float_to_int_32_nan.stderr | 4 ++-- .../intrinsics/float_to_int_32_nanneg.stderr | 4 ++-- .../fail/intrinsics/float_to_int_32_neg.stderr | 4 ++-- .../intrinsics/float_to_int_32_too_big1.stderr | 4 ++-- .../intrinsics/float_to_int_32_too_big2.stderr | 4 ++-- .../float_to_int_32_too_small1.stderr | 4 ++-- .../intrinsics/float_to_int_64_inf1.stderr | 4 ++-- .../intrinsics/float_to_int_64_infneg1.stderr | 4 ++-- .../intrinsics/float_to_int_64_infneg2.stderr | 4 ++-- .../fail/intrinsics/float_to_int_64_nan.stderr | 4 ++-- .../fail/intrinsics/float_to_int_64_neg.stderr | 4 ++-- .../intrinsics/float_to_int_64_too_big1.stderr | 4 ++-- .../intrinsics/float_to_int_64_too_big2.stderr | 4 ++-- .../intrinsics/float_to_int_64_too_big3.stderr | 4 ++-- .../intrinsics/float_to_int_64_too_big4.stderr | 4 ++-- .../intrinsics/float_to_int_64_too_big5.stderr | 4 ++-- .../intrinsics/float_to_int_64_too_big6.stderr | 4 ++-- .../intrinsics/float_to_int_64_too_big7.stderr | 4 ++-- .../float_to_int_64_too_small1.stderr | 4 ++-- .../float_to_int_64_too_small2.stderr | 4 ++-- .../float_to_int_64_too_small3.stderr | 4 ++-- tests/fail/intrinsics/unchecked_add1.stderr | 4 ++-- tests/fail/intrinsics/unchecked_add2.stderr | 4 ++-- tests/fail/intrinsics/unchecked_div1.stderr | 4 ++-- tests/fail/intrinsics/unchecked_mul1.stderr | 4 ++-- tests/fail/intrinsics/unchecked_mul2.stderr | 4 ++-- tests/fail/intrinsics/unchecked_sub1.stderr | 4 ++-- tests/fail/intrinsics/unchecked_sub2.stderr | 4 ++-- tests/fail/panic/unwind_panic_abort.stderr | 4 ++-- .../fail/stacked_borrows/illegal_write1.stderr | 4 ++-- .../fail/stacked_borrows/illegal_write2.stderr | 10 +++++----- .../fail/stacked_borrows/illegal_write3.stderr | 10 +++++----- .../fail/stacked_borrows/illegal_write6.stderr | 7 ++++--- tests/fail/stacked_borrows/raw_tracking.stderr | 10 +++++----- .../shr_frozen_violation1.stderr | 18 +++++++++--------- .../transmute-is-no-escape.stderr | 10 +++++----- .../stacked_borrows/unescaped_local.stderr | 10 +++++----- .../intptrcast_alignment_check.stderr | 4 ++-- tests/fail/zst2.stderr | 4 ++-- tests/fail/zst3.stderr | 4 ++-- 50 files changed, 127 insertions(+), 126 deletions(-) diff --git a/tests/fail/box-cell-alias.stderr b/tests/fail/box-cell-alias.stderr index 44813be9780c..e5a3ad3d33af 100644 --- a/tests/fail/box-cell-alias.stderr +++ b/tests/fail/box-cell-alias.stderr @@ -1,11 +1,11 @@ error: Undefined Behavior: trying to reborrow for SharedReadWrite permission at ALLOC[0x0], but that tag does not exist in the borrow stack for this location --> $DIR/box-cell-alias.rs:LL:CC | -LL | unsafe { (*ptr).set(20); } - | ^^^^^^^^^^^^^^ - | | - | trying to reborrow for SharedReadWrite permission at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - | this error occurs as part of a reborrow at ALLOC[0x0..0x1] +LL | (*ptr).set(20); + | ^^^^^^^^^^^^^^ + | | + | trying to reborrow for SharedReadWrite permission at ALLOC[0x0], but that tag does not exist in the borrow stack for this location + | this error occurs as part of a reborrow at ALLOC[0x0..0x1] | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information diff --git a/tests/fail/dangling_pointers/maybe_null_pointer_write_zst.stderr b/tests/fail/dangling_pointers/maybe_null_pointer_write_zst.stderr index dc810424abc6..79fd2ba08685 100644 --- a/tests/fail/dangling_pointers/maybe_null_pointer_write_zst.stderr +++ b/tests/fail/dangling_pointers/maybe_null_pointer_write_zst.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: dereferencing pointer failed: ALLOC has size 1, so pointer at offset -2048 is out-of-bounds --> $DIR/maybe_null_pointer_write_zst.rs:LL:CC | -LL | unsafe { *ptr = zst_val; } - | ^^^^^^^^^^^^^^ dereferencing pointer failed: ALLOC has size 1, so pointer at offset -2048 is out-of-bounds +LL | *ptr = zst_val; + | ^^^^^^^^^^^^^^ dereferencing pointer failed: ALLOC has size 1, so pointer at offset -2048 is out-of-bounds | = 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 diff --git a/tests/fail/intrinsics/copy_null.stderr b/tests/fail/intrinsics/copy_null.stderr index 461f529fa85d..bb5a8742e909 100644 --- a/tests/fail/intrinsics/copy_null.stderr +++ b/tests/fail/intrinsics/copy_null.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: memory access failed: null pointer is not a valid pointer --> $DIR/copy_null.rs:LL:CC | -LL | unsafe { copy_nonoverlapping(std::ptr::null(), ptr, 0); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: null pointer is not a valid pointer +LL | copy_nonoverlapping(std::ptr::null(), ptr, 0); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: null pointer is not a valid pointer | = 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 diff --git a/tests/fail/intrinsics/copy_unaligned.stderr b/tests/fail/intrinsics/copy_unaligned.stderr index b99588698d22..b244eaeb4191 100644 --- a/tests/fail/intrinsics/copy_unaligned.stderr +++ b/tests/fail/intrinsics/copy_unaligned.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: accessing memory with alignment ALIGN, but alignment ALIGN is required --> $DIR/copy_unaligned.rs:LL:CC | -LL | unsafe { copy_nonoverlapping(&data[5], ptr, 0); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ accessing memory with alignment ALIGN, but alignment ALIGN is required +LL | copy_nonoverlapping(&data[5], ptr, 0); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ accessing memory with alignment ALIGN, but alignment ALIGN is required | = 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 diff --git a/tests/fail/intrinsics/exact_div1.stderr b/tests/fail/intrinsics/exact_div1.stderr index a0f03b201a8d..66f8168fade7 100644 --- a/tests/fail/intrinsics/exact_div1.stderr +++ b/tests/fail/intrinsics/exact_div1.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: calculating the remainder with a divisor of zero --> $DIR/exact_div1.rs:LL:CC | -LL | unsafe { std::intrinsics::exact_div(2, 0); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calculating the remainder with a divisor of zero +LL | std::intrinsics::exact_div(2, 0); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calculating the remainder with a divisor of zero | = 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 diff --git a/tests/fail/intrinsics/exact_div2.stderr b/tests/fail/intrinsics/exact_div2.stderr index 78a85c9caac6..2c102dd0b55c 100644 --- a/tests/fail/intrinsics/exact_div2.stderr +++ b/tests/fail/intrinsics/exact_div2.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: exact_div: 2_u16 cannot be divided by 3_u16 without remainder --> $DIR/exact_div2.rs:LL:CC | -LL | unsafe { std::intrinsics::exact_div(2u16, 3); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ exact_div: 2_u16 cannot be divided by 3_u16 without remainder +LL | std::intrinsics::exact_div(2u16, 3); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ exact_div: 2_u16 cannot be divided by 3_u16 without remainder | = 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 diff --git a/tests/fail/intrinsics/exact_div3.stderr b/tests/fail/intrinsics/exact_div3.stderr index 3062b60d468e..61eacdc65ff3 100644 --- a/tests/fail/intrinsics/exact_div3.stderr +++ b/tests/fail/intrinsics/exact_div3.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: exact_div: -19_i8 cannot be divided by 2_i8 without remainder --> $DIR/exact_div3.rs:LL:CC | -LL | unsafe { std::intrinsics::exact_div(-19i8, 2); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ exact_div: -19_i8 cannot be divided by 2_i8 without remainder +LL | std::intrinsics::exact_div(-19i8, 2); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ exact_div: -19_i8 cannot be divided by 2_i8 without remainder | = 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 diff --git a/tests/fail/intrinsics/exact_div4.stderr b/tests/fail/intrinsics/exact_div4.stderr index 1ae67ad87a5d..a3f5aafbe2d6 100644 --- a/tests/fail/intrinsics/exact_div4.stderr +++ b/tests/fail/intrinsics/exact_div4.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: overflow in signed remainder (dividing MIN by -1) --> $DIR/exact_div4.rs:LL:CC | -LL | unsafe { std::intrinsics::exact_div(i64::MIN, -1); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow in signed remainder (dividing MIN by -1) +LL | std::intrinsics::exact_div(i64::MIN, -1); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow in signed remainder (dividing MIN by -1) | = 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 diff --git a/tests/fail/intrinsics/float_to_int_32_inf1.stderr b/tests/fail/intrinsics/float_to_int_32_inf1.stderr index cdf232d93eb2..b12fd13b5f4d 100644 --- a/tests/fail/intrinsics/float_to_int_32_inf1.stderr +++ b/tests/fail/intrinsics/float_to_int_32_inf1.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on +Inf which cannot be represented in target type `i32` --> $DIR/float_to_int_32_inf1.rs:LL:CC | -LL | unsafe { float_to_int_unchecked::(f32::INFINITY); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on +Inf which cannot be represented in target type `i32` +LL | float_to_int_unchecked::(f32::INFINITY); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on +Inf which cannot be represented in target type `i32` | = 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 diff --git a/tests/fail/intrinsics/float_to_int_32_infneg1.stderr b/tests/fail/intrinsics/float_to_int_32_infneg1.stderr index ae7301193682..d9223462bfa5 100644 --- a/tests/fail/intrinsics/float_to_int_32_infneg1.stderr +++ b/tests/fail/intrinsics/float_to_int_32_infneg1.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on -Inf which cannot be represented in target type `i32` --> $DIR/float_to_int_32_infneg1.rs:LL:CC | -LL | unsafe { float_to_int_unchecked::(f32::NEG_INFINITY); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -Inf which cannot be represented in target type `i32` +LL | float_to_int_unchecked::(f32::NEG_INFINITY); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -Inf which cannot be represented in target type `i32` | = 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 diff --git a/tests/fail/intrinsics/float_to_int_32_nan.stderr b/tests/fail/intrinsics/float_to_int_32_nan.stderr index 9c20abef78df..cb8764174abd 100644 --- a/tests/fail/intrinsics/float_to_int_32_nan.stderr +++ b/tests/fail/intrinsics/float_to_int_32_nan.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on NaN which cannot be represented in target type `u32` --> $DIR/float_to_int_32_nan.rs:LL:CC | -LL | unsafe { float_to_int_unchecked::(f32::NAN); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on NaN which cannot be represented in target type `u32` +LL | float_to_int_unchecked::(f32::NAN); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on NaN which cannot be represented in target type `u32` | = 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 diff --git a/tests/fail/intrinsics/float_to_int_32_nanneg.stderr b/tests/fail/intrinsics/float_to_int_32_nanneg.stderr index f5675fd654dd..49e19bf96356 100644 --- a/tests/fail/intrinsics/float_to_int_32_nanneg.stderr +++ b/tests/fail/intrinsics/float_to_int_32_nanneg.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on NaN which cannot be represented in target type `u32` --> $DIR/float_to_int_32_nanneg.rs:LL:CC | -LL | unsafe { float_to_int_unchecked::(-f32::NAN); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on NaN which cannot be represented in target type `u32` +LL | float_to_int_unchecked::(-f32::NAN); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on NaN which cannot be represented in target type `u32` | = 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 diff --git a/tests/fail/intrinsics/float_to_int_32_neg.stderr b/tests/fail/intrinsics/float_to_int_32_neg.stderr index 3b7c755af654..5d847166a071 100644 --- a/tests/fail/intrinsics/float_to_int_32_neg.stderr +++ b/tests/fail/intrinsics/float_to_int_32_neg.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on -1 which cannot be represented in target type `u32` --> $DIR/float_to_int_32_neg.rs:LL:CC | -LL | unsafe { float_to_int_unchecked::(-1.000000001f32); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -1 which cannot be represented in target type `u32` +LL | float_to_int_unchecked::(-1.000000001f32); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -1 which cannot be represented in target type `u32` | = 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 diff --git a/tests/fail/intrinsics/float_to_int_32_too_big1.stderr b/tests/fail/intrinsics/float_to_int_32_too_big1.stderr index abfda9eef0af..be6ad1f381d4 100644 --- a/tests/fail/intrinsics/float_to_int_32_too_big1.stderr +++ b/tests/fail/intrinsics/float_to_int_32_too_big1.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on 2.14748365E+9 which cannot be represented in target type `i32` --> $DIR/float_to_int_32_too_big1.rs:LL:CC | -LL | unsafe { float_to_int_unchecked::(2147483648.0f32); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on 2.14748365E+9 which cannot be represented in target type `i32` +LL | float_to_int_unchecked::(2147483648.0f32); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on 2.14748365E+9 which cannot be represented in target type `i32` | = 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 diff --git a/tests/fail/intrinsics/float_to_int_32_too_big2.stderr b/tests/fail/intrinsics/float_to_int_32_too_big2.stderr index 2680d0c9908c..d7fbe5a34b52 100644 --- a/tests/fail/intrinsics/float_to_int_32_too_big2.stderr +++ b/tests/fail/intrinsics/float_to_int_32_too_big2.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on 4.2949673E+9 which cannot be represented in target type `u32` --> $DIR/float_to_int_32_too_big2.rs:LL:CC | -LL | unsafe { float_to_int_unchecked::((u32::MAX-127) as f32); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on 4.2949673E+9 which cannot be represented in target type `u32` +LL | float_to_int_unchecked::((u32::MAX - 127) as f32); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on 4.2949673E+9 which cannot be represented in target type `u32` | = 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 diff --git a/tests/fail/intrinsics/float_to_int_32_too_small1.stderr b/tests/fail/intrinsics/float_to_int_32_too_small1.stderr index b03bd380df47..2c225b85ec90 100644 --- a/tests/fail/intrinsics/float_to_int_32_too_small1.stderr +++ b/tests/fail/intrinsics/float_to_int_32_too_small1.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on -2.1474839E+9 which cannot be represented in target type `i32` --> $DIR/float_to_int_32_too_small1.rs:LL:CC | -LL | unsafe { float_to_int_unchecked::(-2147483904.0f32); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -2.1474839E+9 which cannot be represented in target type `i32` +LL | float_to_int_unchecked::(-2147483904.0f32); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -2.1474839E+9 which cannot be represented in target type `i32` | = 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 diff --git a/tests/fail/intrinsics/float_to_int_64_inf1.stderr b/tests/fail/intrinsics/float_to_int_64_inf1.stderr index 7509844cfd41..7bb1f08afa87 100644 --- a/tests/fail/intrinsics/float_to_int_64_inf1.stderr +++ b/tests/fail/intrinsics/float_to_int_64_inf1.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on +Inf which cannot be represented in target type `u128` --> $DIR/float_to_int_64_inf1.rs:LL:CC | -LL | unsafe { float_to_int_unchecked::(f64::INFINITY); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on +Inf which cannot be represented in target type `u128` +LL | float_to_int_unchecked::(f64::INFINITY); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on +Inf which cannot be represented in target type `u128` | = 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 diff --git a/tests/fail/intrinsics/float_to_int_64_infneg1.stderr b/tests/fail/intrinsics/float_to_int_64_infneg1.stderr index 539cd52d83d0..eb96f6869a14 100644 --- a/tests/fail/intrinsics/float_to_int_64_infneg1.stderr +++ b/tests/fail/intrinsics/float_to_int_64_infneg1.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on -Inf which cannot be represented in target type `u128` --> $DIR/float_to_int_64_infneg1.rs:LL:CC | -LL | unsafe { float_to_int_unchecked::(f64::NEG_INFINITY); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -Inf which cannot be represented in target type `u128` +LL | float_to_int_unchecked::(f64::NEG_INFINITY); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -Inf which cannot be represented in target type `u128` | = 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 diff --git a/tests/fail/intrinsics/float_to_int_64_infneg2.stderr b/tests/fail/intrinsics/float_to_int_64_infneg2.stderr index ceb18c3f4121..a2f847be9071 100644 --- a/tests/fail/intrinsics/float_to_int_64_infneg2.stderr +++ b/tests/fail/intrinsics/float_to_int_64_infneg2.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on -Inf which cannot be represented in target type `i128` --> $DIR/float_to_int_64_infneg2.rs:LL:CC | -LL | unsafe { float_to_int_unchecked::(f64::NEG_INFINITY); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -Inf which cannot be represented in target type `i128` +LL | float_to_int_unchecked::(f64::NEG_INFINITY); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -Inf which cannot be represented in target type `i128` | = 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 diff --git a/tests/fail/intrinsics/float_to_int_64_nan.stderr b/tests/fail/intrinsics/float_to_int_64_nan.stderr index eee8d2fac0b3..8da854975820 100644 --- a/tests/fail/intrinsics/float_to_int_64_nan.stderr +++ b/tests/fail/intrinsics/float_to_int_64_nan.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on NaN which cannot be represented in target type `u32` --> $DIR/float_to_int_64_nan.rs:LL:CC | -LL | unsafe { float_to_int_unchecked::(f64::NAN); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on NaN which cannot be represented in target type `u32` +LL | float_to_int_unchecked::(f64::NAN); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on NaN which cannot be represented in target type `u32` | = 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 diff --git a/tests/fail/intrinsics/float_to_int_64_neg.stderr b/tests/fail/intrinsics/float_to_int_64_neg.stderr index 384c0232465a..35bb0aaa22cb 100644 --- a/tests/fail/intrinsics/float_to_int_64_neg.stderr +++ b/tests/fail/intrinsics/float_to_int_64_neg.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on -1 which cannot be represented in target type `u128` --> $DIR/float_to_int_64_neg.rs:LL:CC | -LL | unsafe { float_to_int_unchecked::(-1.0000000000001f64); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -1 which cannot be represented in target type `u128` +LL | float_to_int_unchecked::(-1.0000000000001f64); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -1 which cannot be represented in target type `u128` | = 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 diff --git a/tests/fail/intrinsics/float_to_int_64_too_big1.stderr b/tests/fail/intrinsics/float_to_int_64_too_big1.stderr index bb5b10a2710f..e031e00709e0 100644 --- a/tests/fail/intrinsics/float_to_int_64_too_big1.stderr +++ b/tests/fail/intrinsics/float_to_int_64_too_big1.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on 2147483648 which cannot be represented in target type `i32` --> $DIR/float_to_int_64_too_big1.rs:LL:CC | -LL | unsafe { float_to_int_unchecked::(2147483648.0f64); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on 2147483648 which cannot be represented in target type `i32` +LL | float_to_int_unchecked::(2147483648.0f64); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on 2147483648 which cannot be represented in target type `i32` | = 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 diff --git a/tests/fail/intrinsics/float_to_int_64_too_big2.stderr b/tests/fail/intrinsics/float_to_int_64_too_big2.stderr index a4d57c2f5cee..8c4478603fbd 100644 --- a/tests/fail/intrinsics/float_to_int_64_too_big2.stderr +++ b/tests/fail/intrinsics/float_to_int_64_too_big2.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on 9.2233720368547758E+18 which cannot be represented in target type `i64` --> $DIR/float_to_int_64_too_big2.rs:LL:CC | -LL | unsafe { float_to_int_unchecked::(9223372036854775808.0f64); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on 9.2233720368547758E+18 which cannot be represented in target type `i64` +LL | float_to_int_unchecked::(9223372036854775808.0f64); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on 9.2233720368547758E+18 which cannot be represented in target type `i64` | = 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 diff --git a/tests/fail/intrinsics/float_to_int_64_too_big3.stderr b/tests/fail/intrinsics/float_to_int_64_too_big3.stderr index 2b7379fcbd38..d7f97f37de59 100644 --- a/tests/fail/intrinsics/float_to_int_64_too_big3.stderr +++ b/tests/fail/intrinsics/float_to_int_64_too_big3.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on 1.8446744073709552E+19 which cannot be represented in target type `u64` --> $DIR/float_to_int_64_too_big3.rs:LL:CC | -LL | unsafe { float_to_int_unchecked::(18446744073709551616.0f64); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on 1.8446744073709552E+19 which cannot be represented in target type `u64` +LL | float_to_int_unchecked::(18446744073709551616.0f64); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on 1.8446744073709552E+19 which cannot be represented in target type `u64` | = 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 diff --git a/tests/fail/intrinsics/float_to_int_64_too_big4.stderr b/tests/fail/intrinsics/float_to_int_64_too_big4.stderr index d30817607b9f..cfac443f4c9e 100644 --- a/tests/fail/intrinsics/float_to_int_64_too_big4.stderr +++ b/tests/fail/intrinsics/float_to_int_64_too_big4.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on 3.4028236692093846E+38 which cannot be represented in target type `u128` --> $DIR/float_to_int_64_too_big4.rs:LL:CC | -LL | unsafe { float_to_int_unchecked::(u128::MAX as f64); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on 3.4028236692093846E+38 which cannot be represented in target type `u128` +LL | float_to_int_unchecked::(u128::MAX as f64); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on 3.4028236692093846E+38 which cannot be represented in target type `u128` | = 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 diff --git a/tests/fail/intrinsics/float_to_int_64_too_big5.stderr b/tests/fail/intrinsics/float_to_int_64_too_big5.stderr index f6b0c0a3527f..a0d501dad303 100644 --- a/tests/fail/intrinsics/float_to_int_64_too_big5.stderr +++ b/tests/fail/intrinsics/float_to_int_64_too_big5.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on 2.4028236692093845E+38 which cannot be represented in target type `i128` --> $DIR/float_to_int_64_too_big5.rs:LL:CC | -LL | unsafe { float_to_int_unchecked::(240282366920938463463374607431768211455.0f64); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on 2.4028236692093845E+38 which cannot be represented in target type `i128` +LL | float_to_int_unchecked::(240282366920938463463374607431768211455.0f64); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on 2.4028236692093845E+38 which cannot be represented in target type `i128` | = 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 diff --git a/tests/fail/intrinsics/float_to_int_64_too_big6.stderr b/tests/fail/intrinsics/float_to_int_64_too_big6.stderr index e0eab8148b07..afb5d4ffe722 100644 --- a/tests/fail/intrinsics/float_to_int_64_too_big6.stderr +++ b/tests/fail/intrinsics/float_to_int_64_too_big6.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on 1.7976931348623157E+308 which cannot be represented in target type `u128` --> $DIR/float_to_int_64_too_big6.rs:LL:CC | -LL | unsafe { float_to_int_unchecked::(f64::MAX); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on 1.7976931348623157E+308 which cannot be represented in target type `u128` +LL | float_to_int_unchecked::(f64::MAX); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on 1.7976931348623157E+308 which cannot be represented in target type `u128` | = 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 diff --git a/tests/fail/intrinsics/float_to_int_64_too_big7.stderr b/tests/fail/intrinsics/float_to_int_64_too_big7.stderr index a291b21c7aad..291acf529b4f 100644 --- a/tests/fail/intrinsics/float_to_int_64_too_big7.stderr +++ b/tests/fail/intrinsics/float_to_int_64_too_big7.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on -1.7976931348623157E+308 which cannot be represented in target type `i128` --> $DIR/float_to_int_64_too_big7.rs:LL:CC | -LL | unsafe { float_to_int_unchecked::(f64::MIN); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -1.7976931348623157E+308 which cannot be represented in target type `i128` +LL | float_to_int_unchecked::(f64::MIN); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -1.7976931348623157E+308 which cannot be represented in target type `i128` | = 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 diff --git a/tests/fail/intrinsics/float_to_int_64_too_small1.stderr b/tests/fail/intrinsics/float_to_int_64_too_small1.stderr index 81ca218505dd..ceb625972690 100644 --- a/tests/fail/intrinsics/float_to_int_64_too_small1.stderr +++ b/tests/fail/intrinsics/float_to_int_64_too_small1.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on -2147483649 which cannot be represented in target type `i32` --> $DIR/float_to_int_64_too_small1.rs:LL:CC | -LL | unsafe { float_to_int_unchecked::(-2147483649.0f64); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -2147483649 which cannot be represented in target type `i32` +LL | float_to_int_unchecked::(-2147483649.0f64); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -2147483649 which cannot be represented in target type `i32` | = 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 diff --git a/tests/fail/intrinsics/float_to_int_64_too_small2.stderr b/tests/fail/intrinsics/float_to_int_64_too_small2.stderr index 245f5cf0238c..f8255c2daca0 100644 --- a/tests/fail/intrinsics/float_to_int_64_too_small2.stderr +++ b/tests/fail/intrinsics/float_to_int_64_too_small2.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on -9.2233720368547778E+18 which cannot be represented in target type `i64` --> $DIR/float_to_int_64_too_small2.rs:LL:CC | -LL | unsafe { float_to_int_unchecked::(-9223372036854777856.0f64); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -9.2233720368547778E+18 which cannot be represented in target type `i64` +LL | float_to_int_unchecked::(-9223372036854777856.0f64); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -9.2233720368547778E+18 which cannot be represented in target type `i64` | = 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 diff --git a/tests/fail/intrinsics/float_to_int_64_too_small3.stderr b/tests/fail/intrinsics/float_to_int_64_too_small3.stderr index f684ed2cde98..6bfb6f1f18d8 100644 --- a/tests/fail/intrinsics/float_to_int_64_too_small3.stderr +++ b/tests/fail/intrinsics/float_to_int_64_too_small3.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on -2.4028236692093845E+38 which cannot be represented in target type `i128` --> $DIR/float_to_int_64_too_small3.rs:LL:CC | -LL | unsafe { float_to_int_unchecked::(-240282366920938463463374607431768211455.0f64); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -2.4028236692093845E+38 which cannot be represented in target type `i128` +LL | float_to_int_unchecked::(-240282366920938463463374607431768211455.0f64); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -2.4028236692093845E+38 which cannot be represented in target type `i128` | = 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 diff --git a/tests/fail/intrinsics/unchecked_add1.stderr b/tests/fail/intrinsics/unchecked_add1.stderr index b967b46ac9ba..403bbbac5149 100644 --- a/tests/fail/intrinsics/unchecked_add1.stderr +++ b/tests/fail/intrinsics/unchecked_add1.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: overflow executing `unchecked_add` --> $DIR/unchecked_add1.rs:LL:CC | -LL | unsafe { std::intrinsics::unchecked_add(40000u16, 30000); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow executing `unchecked_add` +LL | std::intrinsics::unchecked_add(40000u16, 30000); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow executing `unchecked_add` | = 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 diff --git a/tests/fail/intrinsics/unchecked_add2.stderr b/tests/fail/intrinsics/unchecked_add2.stderr index 18a116b7da96..4881fce719e7 100644 --- a/tests/fail/intrinsics/unchecked_add2.stderr +++ b/tests/fail/intrinsics/unchecked_add2.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: overflow executing `unchecked_add` --> $DIR/unchecked_add2.rs:LL:CC | -LL | unsafe { std::intrinsics::unchecked_add(-30000i16, -8000); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow executing `unchecked_add` +LL | std::intrinsics::unchecked_add(-30000i16, -8000); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow executing `unchecked_add` | = 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 diff --git a/tests/fail/intrinsics/unchecked_div1.stderr b/tests/fail/intrinsics/unchecked_div1.stderr index f153e4efd984..4792608961d3 100644 --- a/tests/fail/intrinsics/unchecked_div1.stderr +++ b/tests/fail/intrinsics/unchecked_div1.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: overflow in signed division (dividing MIN by -1) --> $DIR/unchecked_div1.rs:LL:CC | -LL | unsafe { std::intrinsics::unchecked_div(i16::MIN, -1); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow in signed division (dividing MIN by -1) +LL | std::intrinsics::unchecked_div(i16::MIN, -1); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow in signed division (dividing MIN by -1) | = 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 diff --git a/tests/fail/intrinsics/unchecked_mul1.stderr b/tests/fail/intrinsics/unchecked_mul1.stderr index 5372ba9933a2..e94676fdfed7 100644 --- a/tests/fail/intrinsics/unchecked_mul1.stderr +++ b/tests/fail/intrinsics/unchecked_mul1.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: overflow executing `unchecked_mul` --> $DIR/unchecked_mul1.rs:LL:CC | -LL | unsafe { std::intrinsics::unchecked_mul(300u16, 250u16); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow executing `unchecked_mul` +LL | std::intrinsics::unchecked_mul(300u16, 250u16); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow executing `unchecked_mul` | = 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 diff --git a/tests/fail/intrinsics/unchecked_mul2.stderr b/tests/fail/intrinsics/unchecked_mul2.stderr index 20a44d2422ae..493e04e46634 100644 --- a/tests/fail/intrinsics/unchecked_mul2.stderr +++ b/tests/fail/intrinsics/unchecked_mul2.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: overflow executing `unchecked_mul` --> $DIR/unchecked_mul2.rs:LL:CC | -LL | unsafe { std::intrinsics::unchecked_mul(1_000_000_000i32, -4); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow executing `unchecked_mul` +LL | std::intrinsics::unchecked_mul(1_000_000_000i32, -4); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow executing `unchecked_mul` | = 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 diff --git a/tests/fail/intrinsics/unchecked_sub1.stderr b/tests/fail/intrinsics/unchecked_sub1.stderr index 12abfed8ff73..838005dc1e31 100644 --- a/tests/fail/intrinsics/unchecked_sub1.stderr +++ b/tests/fail/intrinsics/unchecked_sub1.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: overflow executing `unchecked_sub` --> $DIR/unchecked_sub1.rs:LL:CC | -LL | unsafe { std::intrinsics::unchecked_sub(14u32, 22); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow executing `unchecked_sub` +LL | std::intrinsics::unchecked_sub(14u32, 22); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow executing `unchecked_sub` | = 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 diff --git a/tests/fail/intrinsics/unchecked_sub2.stderr b/tests/fail/intrinsics/unchecked_sub2.stderr index d62d2de2f930..dc4b17019879 100644 --- a/tests/fail/intrinsics/unchecked_sub2.stderr +++ b/tests/fail/intrinsics/unchecked_sub2.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: overflow executing `unchecked_sub` --> $DIR/unchecked_sub2.rs:LL:CC | -LL | unsafe { std::intrinsics::unchecked_sub(30000i16, -7000); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow executing `unchecked_sub` +LL | std::intrinsics::unchecked_sub(30000i16, -7000); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow executing `unchecked_sub` | = 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 diff --git a/tests/fail/panic/unwind_panic_abort.stderr b/tests/fail/panic/unwind_panic_abort.stderr index 7ae965156f00..7094aebd6131 100644 --- a/tests/fail/panic/unwind_panic_abort.stderr +++ b/tests/fail/panic/unwind_panic_abort.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: unwinding past a stack frame that does not allow unwinding --> $DIR/unwind_panic_abort.rs:LL:CC | -LL | unsafe { miri_start_panic(&mut 0); } - | ^^^^^^^^^^^^^^^^^^^^^^^^ unwinding past a stack frame that does not allow unwinding +LL | miri_start_panic(&mut 0); + | ^^^^^^^^^^^^^^^^^^^^^^^^ unwinding past a stack frame that does not allow unwinding | = 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 diff --git a/tests/fail/stacked_borrows/illegal_write1.stderr b/tests/fail/stacked_borrows/illegal_write1.stderr index 76639960a923..a70a45f2235a 100644 --- a/tests/fail/stacked_borrows/illegal_write1.stderr +++ b/tests/fail/stacked_borrows/illegal_write1.stderr @@ -17,8 +17,8 @@ LL | let xref = &*target; help: was later invalidated at offsets [0x0..0x4] --> $DIR/illegal_write1.rs:LL:CC | -LL | unsafe { *x = 42; } // invalidates shared ref, activates raw - | ^^^^^^^ +LL | *x = 42; // invalidates shared ref, activates raw + | ^^^^^^^ = note: inside `main` at $DIR/illegal_write1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/illegal_write2.stderr b/tests/fail/stacked_borrows/illegal_write2.stderr index 3a225123d1f2..d2a06cc386a1 100644 --- a/tests/fail/stacked_borrows/illegal_write2.stderr +++ b/tests/fail/stacked_borrows/illegal_write2.stderr @@ -1,11 +1,11 @@ error: Undefined Behavior: attempting a write access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location --> $DIR/illegal_write2.rs:LL:CC | -LL | unsafe { *target2 = 13; } - | ^^^^^^^^^^^^^ - | | - | attempting a write access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - | this error occurs as part of an access at ALLOC[0x0..0x4] +LL | *target2 = 13; + | ^^^^^^^^^^^^^ + | | + | attempting a write access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location + | this error occurs as part of an access at ALLOC[0x0..0x4] | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information diff --git a/tests/fail/stacked_borrows/illegal_write3.stderr b/tests/fail/stacked_borrows/illegal_write3.stderr index 0dc948b29152..fc87557ea9b4 100644 --- a/tests/fail/stacked_borrows/illegal_write3.stderr +++ b/tests/fail/stacked_borrows/illegal_write3.stderr @@ -1,11 +1,11 @@ error: Undefined Behavior: attempting a write access using at ALLOC[0x0], but that tag only grants SharedReadOnly permission for this location --> $DIR/illegal_write3.rs:LL:CC | -LL | unsafe { *ptr = 42; } - | ^^^^^^^^^ - | | - | attempting a write access using at ALLOC[0x0], but that tag only grants SharedReadOnly permission for this location - | this error occurs as part of an access at ALLOC[0x0..0x4] +LL | *ptr = 42; + | ^^^^^^^^^ + | | + | attempting a write access using at ALLOC[0x0], but that tag only grants SharedReadOnly permission for this location + | this error occurs as part of an access at ALLOC[0x0..0x4] | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information diff --git a/tests/fail/stacked_borrows/illegal_write6.stderr b/tests/fail/stacked_borrows/illegal_write6.stderr index a58abc8377a0..3a7fc0ef8116 100644 --- a/tests/fail/stacked_borrows/illegal_write6.stderr +++ b/tests/fail/stacked_borrows/illegal_write6.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: not granting access to tag because incompatible item is protected: [Unique for (call ID)] --> $DIR/illegal_write6.rs:LL:CC | -LL | unsafe { *y = 2; } - | ^^^^^^ not granting access to tag because incompatible item is protected: [Unique for (call ID)] +LL | *y = 2; + | ^^^^^^ not granting access to tag because incompatible item is protected: [Unique for (call ID)] | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information @@ -22,7 +22,8 @@ help: this protector is live for this call LL | / fn foo(a: &mut u32, y: *mut u32) -> u32 { LL | | *a = 1; LL | | let _b = &*a; -LL | | unsafe { *y = 2; } +LL | | unsafe { +... | LL | | return *a; LL | | } | |_^ diff --git a/tests/fail/stacked_borrows/raw_tracking.stderr b/tests/fail/stacked_borrows/raw_tracking.stderr index 93ae613c3c6b..60a277ee057e 100644 --- a/tests/fail/stacked_borrows/raw_tracking.stderr +++ b/tests/fail/stacked_borrows/raw_tracking.stderr @@ -1,11 +1,11 @@ error: Undefined Behavior: attempting a write access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location --> $DIR/raw_tracking.rs:LL:CC | -LL | unsafe { *raw1 = 13; } - | ^^^^^^^^^^ - | | - | attempting a write access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - | this error occurs as part of an access at ALLOC[0x0..0x4] +LL | *raw1 = 13; + | ^^^^^^^^^^ + | | + | attempting a write access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location + | this error occurs as part of an access at ALLOC[0x0..0x4] | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information diff --git a/tests/fail/stacked_borrows/shr_frozen_violation1.stderr b/tests/fail/stacked_borrows/shr_frozen_violation1.stderr index a2487cca278c..0808d8471b45 100644 --- a/tests/fail/stacked_borrows/shr_frozen_violation1.stderr +++ b/tests/fail/stacked_borrows/shr_frozen_violation1.stderr @@ -1,25 +1,25 @@ error: Undefined Behavior: attempting a write access using at ALLOC[0x0], but that tag only grants SharedReadOnly permission for this location --> $DIR/shr_frozen_violation1.rs:LL:CC | -LL | unsafe { *(x as *const i32 as *mut i32) = 7; } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | attempting a write access using at ALLOC[0x0], but that tag only grants SharedReadOnly permission for this location - | this error occurs as part of an access at ALLOC[0x0..0x4] +LL | *(x as *const i32 as *mut i32) = 7; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | | + | attempting a write access using at ALLOC[0x0], but that tag only grants SharedReadOnly permission for this location + | this error occurs as part of an access at ALLOC[0x0..0x4] | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: tag was most recently created at offsets [0x0..0x4] --> $DIR/shr_frozen_violation1.rs:LL:CC | -LL | unsafe { *(x as *const i32 as *mut i32) = 7; } - | ^ +LL | *(x as *const i32 as *mut i32) = 7; + | ^ = note: inside `unknown_code` at $DIR/shr_frozen_violation1.rs:LL:CC note: inside `foo` at $DIR/shr_frozen_violation1.rs:LL:CC --> $DIR/shr_frozen_violation1.rs:LL:CC | -LL | unknown_code(&*x); - | ^^^^^^^^^^^^^^^^^ +LL | unknown_code(&*x); + | ^^^^^^^^^^^^^^^^^ note: inside `main` at $DIR/shr_frozen_violation1.rs:LL:CC --> $DIR/shr_frozen_violation1.rs:LL:CC | diff --git a/tests/fail/stacked_borrows/transmute-is-no-escape.stderr b/tests/fail/stacked_borrows/transmute-is-no-escape.stderr index 75d74ce39346..c077e37844d1 100644 --- a/tests/fail/stacked_borrows/transmute-is-no-escape.stderr +++ b/tests/fail/stacked_borrows/transmute-is-no-escape.stderr @@ -1,11 +1,11 @@ error: Undefined Behavior: attempting a write access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location --> $DIR/transmute-is-no-escape.rs:LL:CC | -LL | unsafe { *raw = 13; } - | ^^^^^^^^^ - | | - | attempting a write access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - | this error occurs as part of an access at ALLOC[0x0..0x4] +LL | *raw = 13; + | ^^^^^^^^^ + | | + | attempting a write access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location + | this error occurs as part of an access at ALLOC[0x0..0x4] | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information diff --git a/tests/fail/stacked_borrows/unescaped_local.stderr b/tests/fail/stacked_borrows/unescaped_local.stderr index 42a81245f2a8..616c60b8aa1b 100644 --- a/tests/fail/stacked_borrows/unescaped_local.stderr +++ b/tests/fail/stacked_borrows/unescaped_local.stderr @@ -1,11 +1,11 @@ error: Undefined Behavior: attempting a write access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location --> $DIR/unescaped_local.rs:LL:CC | -LL | unsafe { *raw = 13; } - | ^^^^^^^^^ - | | - | attempting a write access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - | this error occurs as part of an access at ALLOC[0x0..0x4] +LL | *raw = 13; + | ^^^^^^^^^ + | | + | attempting a write access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location + | this error occurs as part of an access at ALLOC[0x0..0x4] | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information diff --git a/tests/fail/unaligned_pointers/intptrcast_alignment_check.stderr b/tests/fail/unaligned_pointers/intptrcast_alignment_check.stderr index 8e0986c45335..fe63b05a5501 100644 --- a/tests/fail/unaligned_pointers/intptrcast_alignment_check.stderr +++ b/tests/fail/unaligned_pointers/intptrcast_alignment_check.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: accessing memory with alignment ALIGN, but alignment ALIGN is required --> $DIR/intptrcast_alignment_check.rs:LL:CC | -LL | unsafe { *u16_ptr = 2; } - | ^^^^^^^^^^^^ accessing memory with alignment ALIGN, but alignment ALIGN is required +LL | *u16_ptr = 2; + | ^^^^^^^^^^^^ accessing memory with alignment ALIGN, but alignment ALIGN is required | = help: this usually indicates that your program performed an invalid operation and caused Undefined Behavior = help: but due to `-Zmiri-symbolic-alignment-check`, alignment errors can also be false positives diff --git a/tests/fail/zst2.stderr b/tests/fail/zst2.stderr index 088bb2a1ccf0..0df2098d2e19 100644 --- a/tests/fail/zst2.stderr +++ b/tests/fail/zst2.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: pointer to ALLOC was dereferenced after this allocation got freed --> $DIR/zst2.rs:LL:CC | -LL | unsafe { *x = zst_val; } - | ^^^^^^^^^^^^ pointer to ALLOC was dereferenced after this allocation got freed +LL | *x = zst_val; + | ^^^^^^^^^^^^ pointer to ALLOC was dereferenced after this allocation got freed | = 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 diff --git a/tests/fail/zst3.stderr b/tests/fail/zst3.stderr index a7d84dcaad59..dce0d7b3891c 100644 --- a/tests/fail/zst3.stderr +++ b/tests/fail/zst3.stderr @@ -1,8 +1,8 @@ error: Undefined Behavior: dereferencing pointer failed: ALLOC has size 1, so pointer at offset 2 is out-of-bounds --> $DIR/zst3.rs:LL:CC | -LL | unsafe { *(x as *mut [u8; 0]) = zst_val; } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: ALLOC has size 1, so pointer at offset 2 is out-of-bounds +LL | *(x as *mut [u8; 0]) = zst_val; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: ALLOC has size 1, so pointer at offset 2 is out-of-bounds | = 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