Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions compiler/rustc_public/src/compiler_interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,8 @@ impl<'tcx> CompilerInterface<'tcx> {
// A thread local variable that stores a pointer to [`CompilerInterface`].
scoped_tls::scoped_thread_local!(static TLV: Cell<*const ()>);

// remove this cfg when we have a stable driver.
#[cfg(feature = "rustc_internal")]
pub(crate) fn run<'tcx, F, T>(interface: &CompilerInterface<'tcx>, f: F) -> Result<T, Error>
where
F: FnOnce() -> T,
Expand Down
3 changes: 3 additions & 0 deletions compiler/rustc_public/src/unstable/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ mod internal_cx;
///
/// This trait is only for [`RustcInternal`]. Any other other access to rustc's internals
/// should go through [`rustc_public_bridge::context::CompilerCtxt`].
#[cfg_attr(not(feature = "rustc_internal"), allow(unreachable_pub))]
pub trait InternalCx<'tcx>: Copy + Clone {
fn tcx(self) -> TyCtxt<'tcx>;

Expand Down Expand Up @@ -59,6 +60,7 @@ pub trait InternalCx<'tcx>: Copy + Clone {
/// between internal MIR and rustc_public's IR constructs.
/// However, they should be used seldom and they have no influence in this crate semver.
#[doc(hidden)]
#[cfg_attr(not(feature = "rustc_internal"), allow(unreachable_pub))]
pub trait Stable<'tcx>: PointeeSized {
/// The stable representation of the type implementing Stable.
type T;
Expand All @@ -78,6 +80,7 @@ pub trait Stable<'tcx>: PointeeSized {
/// between internal MIR and rustc_public's IR constructs.
/// They should be used seldom as they have no stability guarantees.
#[doc(hidden)]
#[cfg_attr(not(feature = "rustc_internal"), allow(unreachable_pub))]
pub trait RustcInternal {
type T<'tcx>;
fn internal<'tcx>(
Expand Down
Loading