Skip to content
Open
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 ()>);

// FIXME(makai410): remove this cfg when we have a stable driver.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this FIXME... Maybe just a comment. We could also move this function to be inside rustc_internal.

#[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
2 changes: 1 addition & 1 deletion compiler/rustc_public/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ use crate::unstable::Stable;

pub mod abi;
mod alloc;
pub(crate) mod unstable;
pub mod unstable;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should make this module public. Instead, we should add an attribute to the trait declarations:

/// This is used by the public `rustc_internal::stable` function when feature `rustc_internal` is enabled.
#[cfg_attr(not(feature = "rustc_internal"), allow(unreachable_pub))]
pub trait Stable<'tcx>: PointeeSized {
  // ...
}

#[macro_use]
pub mod crate_def;
pub mod compiler_interface;
Expand Down
Loading