Convert trait declaration to SMIR

This commit is contained in:
Santiago Pastorino
2023-08-04 17:23:26 -03:00
parent 4199a3c13a
commit 496faa857c
4 changed files with 76 additions and 4 deletions

View File

@@ -15,7 +15,7 @@ use std::cell::Cell;
use crate::rustc_smir::Tables;
use self::ty::{Ty, TyKind};
use self::ty::{TraitDecl, TraitDef, Ty, TyKind};
pub mod mir;
pub mod ty;
@@ -84,6 +84,7 @@ pub trait Context {
/// Retrieve all items of the local crate that have a MIR associated with them.
fn all_local_items(&mut self) -> CrateItems;
fn mir_body(&mut self, item: &CrateItem) -> mir::Body;
fn trait_decl(&mut self, trait_def: &TraitDef) -> TraitDecl;
/// Get information about the local crate.
fn local_crate(&self) -> Crate;
/// Retrieve a list of all external crates.