Skip to content

Commit 32da7b3

Browse files
committed
refactor: move the convert mod from rustc_smir to stable_mir
1 parent 09a6316 commit 32da7b3

File tree

10 files changed

+1231
-589
lines changed

10 files changed

+1231
-589
lines changed

compiler/rustc_smir/src/rustc_internal/mod.rs

+1-11
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ use rustc_span::Span;
1717
use rustc_span::def_id::{CrateNum, DefId};
1818
use scoped_tls::scoped_thread_local;
1919
use stable_mir::Error;
20-
use stable_mir::abi::Layout;
21-
use stable_mir::compiler_interface::SmirInterface;
22-
use stable_mir::ty::IndexedVal;
20+
use stable_mir::convert::{RustcInternal, Stable};
2321

2422
use crate::rustc_smir::context::SmirCtxt;
2523
use crate::rustc_smir::{Bridge, IndexedVal, SmirContainer, Tables};
@@ -341,11 +339,3 @@ impl<K: PartialEq + Hash + Eq, V: Copy + Debug + PartialEq + IndexedVal> Index<V
341339
k
342340
}
343341
}
344-
345-
/// Trait used to translate a stable construct to its rustc counterpart.
346-
///
347-
/// This is basically a mirror of [crate::rustc_smir::Stable].
348-
pub trait RustcInternal {
349-
type T<'tcx>;
350-
fn internal<'tcx>(&self, tables: &mut Tables<'_>, tcx: TyCtxt<'tcx>) -> Self::T<'tcx>;
351-
}

compiler/rustc_smir/src/rustc_smir/convert/error.rs

-25
This file was deleted.

0 commit comments

Comments
 (0)