-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #88979 - tmiasko:no-remove-zsts-in-generators, r=oli-obk
Disable RemoveZsts in generators to avoid query cycles Querying layout of a generator requires its optimized MIR. Thus computing layout during MIR optimization of a generator might create a query cycle. Disable RemoveZsts in generators to avoid the issue (similar approach is used in ConstProp transform already). Fixes #88972.
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Regression test for #88972. Used to cause a query cycle: | ||
// optimized mir -> remove zsts -> layout of a generator -> optimized mir. | ||
// | ||
// edition:2018 | ||
// compile-flags: --crate-type=lib | ||
// build-pass | ||
|
||
pub async fn listen() -> Result<(), std::io::Error> { | ||
let f = do_async(); | ||
std::mem::forget(f); | ||
Ok(()) | ||
} | ||
|
||
pub async fn do_async() { | ||
listen().await.unwrap() | ||
} |