about summary refs log tree commit diff
path: root/compiler/stable_mir/src/error.rs
AgeCommit message (Collapse)AuthorLines
2023-12-10remove redundant importssurechen-1/+0
detects redundant imports that can be eliminated. for #117772 : In order to facilitate review and modification, split the checking code and removing redundant imports code into two PR.
2023-12-07Add instance evaluation and methods to read allocCelina G. Val-2/+8
The instance evaluation is needed to handle intrinsics such as `type_id` and `type_name`. Since we now use Allocation to represent all evaluated constants, provide a few methods to help process the data inside an allocation.
2023-12-05Change ty_with_args to return Ty instead of ResultCelina G. Val-1/+1
Although, we would like to avoid crashes whenever possible, and that's why I wanted to make this API fallible. It's looking pretty hard to do proper validation. I think many of our APIs will unfortunately depend on the user doing the correct thing since at the MIR level we are working on, we expect types to have been checked already.
2023-11-20Add place.ty() and Ty build from a kind to smirCelina G. Val-2/+7
2023-10-19Add stable Instance::body() and RustcInternal traitCelina G. Val-0/+7
The `Instance::body()` returns a monomorphized body. For that, we had to implement visitor that monomorphize types and constants. We are also introducing the RustcInternal trait that will allow us to convert back from Stable to Internal. Note that this trait is not yet visible for our users as it depends on Tables. We should probably add a new trait that can be exposed.
2023-10-16Add MonoItems and Instance to stable_mirCelina G. Val-0/+69
Also add a few methods to instantiate instances and get an instance definition. We're still missing support to actually monomorphize the instance body.