]> git.lizzy.rs Git - rust.git/commit - compiler/rustc_codegen_cranelift/src/driver/mod.rs
Auto merge of #105356 - JakobDegen:more-custom-mir, r=oli-obk
authorbors <bors@rust-lang.org>
Thu, 15 Dec 2022 19:59:48 +0000 (19:59 +0000)
committerbors <bors@rust-lang.org>
Thu, 15 Dec 2022 19:59:48 +0000 (19:59 +0000)
commitec56537c4325ce5b798fc3628cbdd48ba4949ae5
treef3196df94cf2fa761085969f50ccf315aeb2a7e0
parent4954a7ef5c5bb45f1c0d021491702ad05d470821
parentb580f29b744d845f75d959d63943ffeab55671fd
Auto merge of #105356 - JakobDegen:more-custom-mir, r=oli-obk

Custom MIR: Many more improvements

Commits are each atomic changes, best reviewed one at a time, with the exception that the last commit includes all the documentation.

### First commit

Unsafetyck was not correctly disabled before for `dialect = "built"` custom MIR. This is fixed and a regression test is added.

### Second commit

Implements `Discriminant`, `SetDiscriminant`, and `SwitchInt`.

### Third commit

Implements indexing, field, and variant projections.

### Fourth commit

Documents the previous commits and everything else.

There is some amount of weirdness here due to having to beat Rust syntax into cooperating with MIR concepts, but it hopefully should not be too much. All of it is documented.

r? `@oli-obk`
compiler/rustc_middle/src/mir/mod.rs