1
Fork 0

Rollup merge of #116964 - celinval:smir-mono-body, r=oli-obk

Add stable Instance::body() and RustcInternal trait

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.

The tests here are very simple, and I'm planning on creating more exhaustive tests in the project-mir repo. But I was hoping to get some feedback here first.

r? ```@oli-obk```
This commit is contained in:
Matthias Krüger 2023-10-21 10:08:17 +02:00 committed by GitHub
commit b7035198e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 217 additions and 7 deletions

View file

@ -225,6 +225,7 @@ pub struct ImplDef(pub DefId);
#[derive(Clone, PartialEq, Eq, Debug)]
pub struct RegionDef(pub DefId);
/// A list of generic arguments.
#[derive(Clone, Debug)]
pub struct GenericArgs(pub Vec<GenericArgKind>);