Skip to content

Commit 1bb84d2

Browse files
committed
Auto merge of #3165 - rust-lang:rustup-2023-11-15, r=RalfJung
Automatic Rustup
2 parents 4c65187 + 5a5e0a9 commit 1bb84d2

20 files changed

+32
-32
lines changed

rust-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3aaa0f57b7b877ef58532a8de075d1e5a79142bf
1+
6d069a0ac7a423db87d86320edd39974f9f0c492

tests/fail/function_calls/arg_inplace_mutate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fn main() {
1414
let ptr = std::ptr::addr_of_mut!(non_copy);
1515
// Inside `callee`, the first argument and `*ptr` are basically
1616
// aliasing places!
17-
Call(_unit = callee(Move(*ptr), ptr), after_call)
17+
Call(_unit = callee(Move(*ptr), ptr), after_call, UnwindContinue())
1818
}
1919
after_call = {
2020
Return()

tests/fail/function_calls/arg_inplace_mutate.stack.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ LL | unsafe { ptr.write(S(0)) };
2727
note: inside `main`
2828
--> $DIR/arg_inplace_mutate.rs:LL:CC
2929
|
30-
LL | Call(_unit = callee(Move(*ptr), ptr), after_call)
31-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30+
LL | Call(_unit = callee(Move(*ptr), ptr), after_call, UnwindContinue())
31+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3232
= note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info)
3333

3434
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

tests/fail/function_calls/arg_inplace_mutate.tree.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ LL | unsafe { ptr.write(S(0)) };
3535
note: inside `main`
3636
--> $DIR/arg_inplace_mutate.rs:LL:CC
3737
|
38-
LL | Call(_unit = callee(Move(*ptr), ptr), after_call)
39-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38+
LL | Call(_unit = callee(Move(*ptr), ptr), after_call, UnwindContinue())
39+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4040
= note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info)
4141

4242
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

tests/fail/function_calls/arg_inplace_observe_after.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fn main() {
1111
{
1212
let non_copy = S(42);
1313
// This could change `non_copy` in-place
14-
Call(_unit = change_arg(Move(non_copy)), after_call)
14+
Call(_unit = change_arg(Move(non_copy)), after_call, UnwindContinue())
1515
}
1616
after_call = {
1717
// So now we must not be allowed to observe non-copy again.

tests/fail/function_calls/arg_inplace_observe_during.none.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ LL | unsafe { ptr.read() };
1111
note: inside `main`
1212
--> $DIR/arg_inplace_observe_during.rs:LL:CC
1313
|
14-
LL | Call(_unit = change_arg(Move(*ptr), ptr), after_call)
15-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14+
LL | Call(_unit = change_arg(Move(*ptr), ptr), after_call, UnwindContinue())
15+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1616

1717
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
1818

tests/fail/function_calls/arg_inplace_observe_during.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fn main() {
1414
let non_copy = S(42);
1515
let ptr = std::ptr::addr_of_mut!(non_copy);
1616
// This could change `non_copy` in-place
17-
Call(_unit = change_arg(Move(*ptr), ptr), after_call)
17+
Call(_unit = change_arg(Move(*ptr), ptr), after_call, UnwindContinue())
1818
}
1919
after_call = {
2020
Return()

tests/fail/function_calls/arg_inplace_observe_during.stack.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ LL | x.0 = 0;
2727
note: inside `main`
2828
--> $DIR/arg_inplace_observe_during.rs:LL:CC
2929
|
30-
LL | Call(_unit = change_arg(Move(*ptr), ptr), after_call)
31-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30+
LL | Call(_unit = change_arg(Move(*ptr), ptr), after_call, UnwindContinue())
31+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3232
= note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info)
3333

3434
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

tests/fail/function_calls/arg_inplace_observe_during.tree.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ LL | x.0 = 0;
3535
note: inside `main`
3636
--> $DIR/arg_inplace_observe_during.rs:LL:CC
3737
|
38-
LL | Call(_unit = change_arg(Move(*ptr), ptr), after_call)
39-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38+
LL | Call(_unit = change_arg(Move(*ptr), ptr), after_call, UnwindContinue())
39+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4040
= note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info)
4141

4242
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

tests/fail/function_calls/return_pointer_aliasing.none.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ LL | unsafe { ptr.read() };
1111
note: inside `main`
1212
--> $DIR/return_pointer_aliasing.rs:LL:CC
1313
|
14-
LL | Call(*ptr = myfun(ptr), after_call)
15-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14+
LL | Call(*ptr = myfun(ptr), after_call, UnwindContinue())
15+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1616

1717
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
1818

tests/fail/function_calls/return_pointer_aliasing.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub fn main() {
1515
let ptr = &raw mut x;
1616
// We arrange for `myfun` to have a pointer that aliases
1717
// its return place. Even just reading from that pointer is UB.
18-
Call(*ptr = myfun(ptr), after_call)
18+
Call(*ptr = myfun(ptr), after_call, UnwindContinue())
1919
}
2020

2121
after_call = {

tests/fail/function_calls/return_pointer_aliasing.stack.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ LL | unsafe { ptr.read() };
2727
note: inside `main`
2828
--> $DIR/return_pointer_aliasing.rs:LL:CC
2929
|
30-
LL | Call(*ptr = myfun(ptr), after_call)
31-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30+
LL | Call(*ptr = myfun(ptr), after_call, UnwindContinue())
31+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3232
= note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info)
3333

3434
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

tests/fail/function_calls/return_pointer_aliasing.tree.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ LL | unsafe { ptr.read() };
3535
note: inside `main`
3636
--> $DIR/return_pointer_aliasing.rs:LL:CC
3737
|
38-
LL | Call(*ptr = myfun(ptr), after_call)
39-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38+
LL | Call(*ptr = myfun(ptr), after_call, UnwindContinue())
39+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4040
= note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info)
4141

4242
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

tests/fail/function_calls/return_pointer_aliasing2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub fn main() {
1515
let ptr = &raw mut _x;
1616
// We arrange for `myfun` to have a pointer that aliases
1717
// its return place. Even just reading from that pointer is UB.
18-
Call(_x = myfun(ptr), after_call)
18+
Call(_x = myfun(ptr), after_call, UnwindContinue())
1919
}
2020

2121
after_call = {

tests/fail/function_calls/return_pointer_aliasing2.stack.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ LL | unsafe { ptr.write(0) };
3030
note: inside `main`
3131
--> $DIR/return_pointer_aliasing2.rs:LL:CC
3232
|
33-
LL | Call(_x = myfun(ptr), after_call)
34-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33+
LL | Call(_x = myfun(ptr), after_call, UnwindContinue())
34+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3535
= note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info)
3636

3737
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

tests/fail/function_calls/return_pointer_aliasing2.tree.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ LL | unsafe { ptr.write(0) };
3535
note: inside `main`
3636
--> $DIR/return_pointer_aliasing2.rs:LL:CC
3737
|
38-
LL | Call(_x = myfun(ptr), after_call)
39-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38+
LL | Call(_x = myfun(ptr), after_call, UnwindContinue())
39+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4040
= note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info)
4141

4242
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

tests/fail/function_calls/return_pointer_on_unwind.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ struct S(i32, [u8; 128]);
1414
fn docall(out: &mut S) {
1515
mir! {
1616
{
17-
Call(*out = callee(), after_call)
17+
Call(*out = callee(), after_call, UnwindContinue())
1818
}
1919

2020
after_call = {
@@ -37,7 +37,7 @@ fn callee() -> S {
3737
// become visible to the outside. In codegen we can see them
3838
// but Miri should detect this as UB!
3939
RET.0 = 42;
40-
Call(_unit = startpanic(), after_call)
40+
Call(_unit = startpanic(), after_call, UnwindContinue())
4141
}
4242

4343
after_call = {

tests/fail/validity/cast_fn_ptr_invalid_caller_arg.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ fn call(f: fn(NonZeroU32)) {
2020
let tmp = ptr::addr_of!(c);
2121
let ptr = tmp as *const NonZeroU32;
2222
// The call site now is a NonZeroU32-to-u32 transmute.
23-
Call(_res = f(*ptr), retblock) //~ERROR: expected something greater or equal to 1
23+
Call(_res = f(*ptr), retblock, UnwindContinue()) //~ERROR: expected something greater or equal to 1
2424
}
2525
retblock = {
2626
Return()

tests/fail/validity/cast_fn_ptr_invalid_caller_arg.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error: Undefined Behavior: constructing invalid value: encountered 0, but expected something greater or equal to 1
22
--> $DIR/cast_fn_ptr_invalid_caller_arg.rs:LL:CC
33
|
4-
LL | Call(_res = f(*ptr), retblock)
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
4+
LL | Call(_res = f(*ptr), retblock, UnwindContinue())
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

tests/pass/function_calls/return_place_on_heap.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub fn main() {
1111
{
1212
let x = 0;
1313
let ptr = &raw mut x;
14-
Call(*ptr = myfun(), after_call)
14+
Call(*ptr = myfun(), after_call, UnwindContinue())
1515
}
1616

1717
after_call = {

0 commit comments

Comments
 (0)