未验证 提交 b54fe764 编写于 作者: M Matthias Krüger 提交者: GitHub

Rollup merge of #114859 - spastorino:add-smir-cx-trait-fns, r=compiler-errors

Add trait related queries to SMIR's rustc_internal

r? `@oli-obk`
......@@ -85,6 +85,22 @@ pub fn all_local_items() -> CrateItems {
with(|cx| cx.all_local_items())
}
pub fn all_trait_decls() -> TraitDecls {
with(|cx| cx.all_trait_decls())
}
pub fn trait_decl(trait_def: &TraitDef) -> TraitDecl {
with(|cx| cx.trait_decl(trait_def))
}
pub fn all_trait_impls() -> ImplTraitDecls {
with(|cx| cx.all_trait_impls())
}
pub fn trait_impl(trait_impl: &ImplDef) -> ImplTrait {
with(|cx| cx.trait_impl(trait_impl))
}
pub trait Context {
fn entry_fn(&mut self) -> Option<CrateItem>;
/// Retrieve all items of the local crate that have a MIR associated with them.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册