about summary refs log tree commit diff
path: root/compiler/rustc_smir/src/rustc_internal/mod.rs
blob: 3eaff9c051f1c8f098f8939427a664990f67431c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Module that implements the bridge between Stable MIR and internal compiler MIR.
//!
//! For that, we define APIs that will temporarily be public to 3P that exposes rustc internal APIs
//! until stable MIR is complete.

use crate::stable_mir;
pub use rustc_span::def_id::{CrateNum, DefId};

pub fn item_def_id(item: &stable_mir::CrateItem) -> DefId {
    item.0
}

pub fn crate_num(item: &stable_mir::Crate) -> CrateNum {
    item.id.into()
}