Stream: t-compiler/help

Topic: MIR `Yield` terminators


Wesley Wiser (May 11 2019 at 15:36, on Zulip):

Does anyone know how to get rustc to generate a MIR block which terminates with TerminatorKind::Yield?

Wesley Wiser (May 11 2019 at 15:37, on Zulip):

I thought perhaps something like this would do it https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=7855a59b2edfa5a99215603f2d9eb03e

Wesley Wiser (May 11 2019 at 15:37, on Zulip):

But there aren't any Yields in the mir

Zoxc (May 11 2019 at 15:45, on Zulip):

Yields are lowered before the MIR printing on the playground

Wesley Wiser (May 11 2019 at 15:45, on Zulip):

Ah ok

Wesley Wiser (May 11 2019 at 15:45, on Zulip):

Thanks!

Zoxc (May 11 2019 at 15:46, on Zulip):

Use rustc test.rs -Z dump-mir-dir=mir -Z dump-mir= to dump intermediate MIR

Jake Goulding (May 11 2019 at 15:46, on Zulip):

intermediate MIR => IMIR

Jake Goulding (May 11 2019 at 15:47, on Zulip):

Rust's intermediate MIR => RIMIR

Last update: Nov 11 2019 at 22:05UTC