Skip to content

Commit 5cada13

Browse files
author
The Miri Cronjob Bot
committed
Merge from rustc
2 parents aa4515e + b3916b8 commit 5cada13

13 files changed

+9
-17
lines changed

src/helpers.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,9 @@ pub fn iter_exported_symbols<'tcx>(
149149
let dependency_formats = tcx.dependency_formats(());
150150
// Find the dependencies of the executable we are running.
151151
let dependency_format = dependency_formats
152-
.iter()
153-
.find(|(crate_type, _)| *crate_type == CrateType::Executable)
152+
.get(&CrateType::Executable)
154153
.expect("interpreting a non-executable crate");
155-
for cnum in dependency_format.1.iter().enumerate().filter_map(|(num, &linkage)| {
154+
for cnum in dependency_format.iter().enumerate().filter_map(|(num, &linkage)| {
156155
// We add 1 to the number because that's what rustc also does everywhere it
157156
// calls `CrateNum::new`...
158157
#[expect(clippy::arithmetic_side_effects)]

src/machine.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,8 +1571,12 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> {
15711571
res
15721572
}
15731573

1574-
fn after_local_read(ecx: &InterpCx<'tcx, Self>, local: mir::Local) -> InterpResult<'tcx> {
1575-
if let Some(data_race) = &ecx.frame().extra.data_race {
1574+
fn after_local_read(
1575+
ecx: &InterpCx<'tcx, Self>,
1576+
frame: &Frame<'tcx, Provenance, FrameExtra<'tcx>>,
1577+
local: mir::Local,
1578+
) -> InterpResult<'tcx> {
1579+
if let Some(data_race) = &frame.extra.data_race {
15761580
data_race.local_read(local, &ecx.machine);
15771581
}
15781582
interp_ok(())

tests/fail-dep/concurrency/windows_join_main.stderr

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ note: inside `main`
2424
LL | / thread::spawn(|| {
2525
LL | | unsafe {
2626
LL | | assert_eq!(WaitForSingleObject(MAIN_THREAD, INFINITE), WAIT_OBJECT_0);
27-
LL | | }
28-
LL | | })
27+
... |
2928
LL | | .join()
3029
| |___________^
3130

tests/fail/function_calls/arg_inplace_mutate.stack.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ LL | | let _unit: ();
1414
LL | | {
1515
LL | | let non_copy = S(42);
1616
... |
17-
LL | | }
1817
LL | | }
1918
| |_____^
2019
help: <TAG> is this argument

tests/fail/function_calls/arg_inplace_mutate.tree.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ LL | | let _unit: ();
1616
LL | | {
1717
LL | | let non_copy = S(42);
1818
... |
19-
LL | | }
2019
LL | | }
2120
| |_____^
2221
help: the protected tag <TAG> was created here, in the initial state Reserved

tests/fail/function_calls/arg_inplace_observe_during.stack.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ LL | | let _unit: ();
1414
LL | | {
1515
LL | | let non_copy = S(42);
1616
... |
17-
LL | |
1817
LL | | }
1918
| |_____^
2019
help: <TAG> is this argument

tests/fail/function_calls/arg_inplace_observe_during.tree.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ LL | | let _unit: ();
1616
LL | | {
1717
LL | | let non_copy = S(42);
1818
... |
19-
LL | |
2019
LL | | }
2120
| |_____^
2221
help: the protected tag <TAG> was created here, in the initial state Reserved

tests/fail/function_calls/return_pointer_aliasing_read.stack.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ LL | | {
1414
LL | | let x = 0;
1515
LL | | let ptr = &raw mut x;
1616
... |
17-
LL | | }
1817
LL | | }
1918
| |_____^
2019
help: <TAG> is this argument

tests/fail/function_calls/return_pointer_aliasing_read.tree.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ LL | | {
1616
LL | | let x = 0;
1717
LL | | let ptr = &raw mut x;
1818
... |
19-
LL | | }
2019
LL | | }
2120
| |_____^
2221
help: the protected tag <TAG> was created here, in the initial state Reserved

tests/fail/function_calls/return_pointer_aliasing_write.stack.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ LL | | {
1414
LL | | let _x = 0;
1515
LL | | let ptr = &raw mut _x;
1616
... |
17-
LL | | }
1817
LL | | }
1918
| |_____^
2019
help: <TAG> is this argument

0 commit comments

Comments
 (0)