rust/compiler/rustc_smir
Matthias Krüger 33744804fe
Rollup merge of #117262 - celinval:issue-38-norm, r=oli-obk
Create a new ConstantKind variant (ZeroSized) for StableMIR

ZeroSized constants can be represented as `mir::Const::Val` even if their layout is not yet known. In those cases, CrateItem::body() was crashing when trying to convert a `ConstValue::ZeroSized` into its stable counterpart  `ConstantKind::Allocated`.

Instead, we now map `ConstValue::ZeroSized` into a new variant: `ConstantKind::ZeroSized`.

**Note:** I didn't add any new test here since we already have covering tests in our project repository which I manually confirmed that will fix the issue.
2023-10-27 11:48:07 +02:00
..
src Rollup merge of #117262 - celinval:issue-38-norm, r=oli-obk 2023-10-27 11:48:07 +02:00
.gitignore Add 'compiler/rustc_smir/' from commit '9abcb5c7b574cf316eb23d3f469187bb86ba3019' 2022-06-02 10:07:25 +00:00
Cargo.toml Add method to convert internal to stable constructs 2023-10-23 12:01:39 -07:00