Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In ConstructCoroutineInClosureShim, pass receiver by mut ref, not mut pointer #123049

Merged
merged 1 commit into from
Mar 27, 2024

Conversation

compiler-errors
Copy link
Member

The receivers were compatible at codegen time, but did not necessarily have the same layouts due to niches, which was caught by miri.

Fixes rust-lang/miri#3400

r? oli-obk

@rustbot
Copy link
Collaborator

rustbot commented Mar 25, 2024

The Miri subtree was changed

cc @rust-lang/miri

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 25, 2024
@@ -0,0 +1,40 @@
#![feature(async_closure, noop_waker, async_fn_traits)]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved the old test from async-closure.rs -> async-closure-drop.rs and then added a new test that tests the calling at async-closure.rs. I wish git were smarter about renames like that lol.

});
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing newline at end of file

@rust-log-analyzer

This comment has been minimized.

@compiler-errors
Copy link
Member Author

I'll bless mir-opt and fix formatting on test when I get off the subway

@compiler-errors compiler-errors force-pushed the coroutine-closure-rcvr branch from dce205b to 417d310 Compare March 25, 2024 22:56
@compiler-errors compiler-errors force-pushed the coroutine-closure-rcvr branch from 417d310 to 22bc5c5 Compare March 26, 2024 16:11
@oli-obk
Copy link
Contributor

oli-obk commented Mar 26, 2024

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 26, 2024

📌 Commit 22bc5c5 has been approved by oli-obk

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 26, 2024
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Mar 26, 2024
…rcvr, r=oli-obk

In `ConstructCoroutineInClosureShim`, pass receiver by mut ref, not mut pointer

The receivers were compatible at codegen time, but did not necessarily have the same layouts due to niches, which was caught by miri.

Fixes rust-lang/miri#3400

r? oli-obk
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 26, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#108675 (Document `adt_const_params` feature in Unstable Book)
 - rust-lang#122120 (Suggest associated type bounds on problematic associated equality bounds)
 - rust-lang#122589 (Fix diagnostics for async block cloning)
 - rust-lang#122835 (Require `DerefMut` and `DerefPure` on `deref!()` patterns when appropriate)
 - rust-lang#123049 (In `ConstructCoroutineInClosureShim`, pass receiver by mut ref, not mut pointer)
 - rust-lang#123055 (enable cargo miri test doctests)
 - rust-lang#123057 (unix fs: Make hurd using explicit new rather than From)
 - rust-lang#123087 (Change `f16` and `f128` clippy stubs to be nonpanicking)
 - rust-lang#123103 (Rename `Inherited` -> `TypeckRootCtxt`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b63dca1 into rust-lang:master Mar 27, 2024
11 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Mar 27, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 27, 2024
Rollup merge of rust-lang#123049 - compiler-errors:coroutine-closure-rcvr, r=oli-obk

In `ConstructCoroutineInClosureShim`, pass receiver by mut ref, not mut pointer

The receivers were compatible at codegen time, but did not necessarily have the same layouts due to niches, which was caught by miri.

Fixes rust-lang/miri#3400

r? oli-obk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE: Layout != Layout
6 participants