diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-12-07 21:38:08 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-07 21:38:08 +0100 |
| commit | 20ed80523a4f3791c2862b0079ae17eed4289c87 (patch) | |
| tree | 7e9661815211f85fd0db428428f5faa438f44206 /compiler/rustc_hir_analysis/src/errors.rs | |
| parent | b20430345e46f0f67265b677dfa580a8b320efcb (diff) | |
| parent | 4616b9fd1d99e3f6d26858f32f835e60ddc3aaa3 (diff) | |
| download | rust-20ed80523a4f3791c2862b0079ae17eed4289c87.tar.gz rust-20ed80523a4f3791c2862b0079ae17eed4289c87.zip | |
Rollup merge of #118688 - celinval:smir-rvalue-ty, r=compiler-errors
Add method to get type of an Rvalue in StableMIR Provide a method to StableMIR users to retrieve the type of an Rvalue operation. There were two possible implementation: 1. Create the logic inside stable_mir to process the type according to the Rvalue semantics, which duplicates the logic of `rustc_middle::mir::Rvalue::ty()`. 2. Implement the Rvalue translation from StableMIR back to internal representation, invoke the `rustc_middle::mir::Rvalue::ty()`, and translate the return value to StableMIR. I chose the first one for now since the duplication was fairly small, and the option 2 would require way more work to translate everything back to rustc internal representation. If we eventually add those translations, we could easily swap to the option 2. ```@compiler-errors``` / ```@ouz-a``` Please let me know if you have any strong opinion here. r? ```@compiler-errors```
Diffstat (limited to 'compiler/rustc_hir_analysis/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
