about summary refs log tree commit diff
path: root/src/librustc_interface/callbacks.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustc_interface/callbacks.rs')
-rw-r--r--src/librustc_interface/callbacks.rs15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/librustc_interface/callbacks.rs b/src/librustc_interface/callbacks.rs
index 7c8e682e9fb..913c67d045e 100644
--- a/src/librustc_interface/callbacks.rs
+++ b/src/librustc_interface/callbacks.rs
@@ -1,6 +1,6 @@
 //! Throughout the compiler tree, there are several places which want to have
 //! access to state or queries while being inside crates that are dependencies
-//! of librustc. To facilitate this, we have the
+//! of librustc_middle. To facilitate this, we have the
 //! `rustc_data_structures::AtomicRef` type, which allows us to setup a global
 //! static which can then be set in this file at program startup.
 //!
@@ -9,12 +9,12 @@
 //! The functions in this file should fall back to the default set in their
 //! origin crate when the `TyCtxt` is not present in TLS.
 
-use rustc::ty::tls;
 use rustc_errors::{Diagnostic, TRACK_DIAGNOSTICS};
+use rustc_middle::ty::tls;
 use std::fmt;
 
-/// This is a callback from libsyntax as it cannot access the implicit state
-/// in librustc otherwise.
+/// This is a callback from librustc_ast as it cannot access the implicit state
+/// in librustc_middle otherwise.
 fn span_debug(span: rustc_span::Span, f: &mut fmt::Formatter<'_>) -> fmt::Result {
     tls::with_opt(|tcx| {
         if let Some(tcx) = tcx {
@@ -25,8 +25,8 @@ fn span_debug(span: rustc_span::Span, f: &mut fmt::Formatter<'_>) -> fmt::Result
     })
 }
 
-/// This is a callback from libsyntax as it cannot access the implicit state
-/// in librustc otherwise. It is used to when diagnostic messages are
+/// This is a callback from librustc_ast as it cannot access the implicit state
+/// in librustc_middle otherwise. It is used to when diagnostic messages are
 /// emitted and stores them in the current query, if there is one.
 fn track_diagnostic(diagnostic: &Diagnostic) {
     tls::with_context_opt(|icx| {
@@ -40,7 +40,7 @@ fn track_diagnostic(diagnostic: &Diagnostic) {
 }
 
 /// This is a callback from librustc_hir as it cannot access the implicit state
-/// in librustc otherwise.
+/// in librustc_middle otherwise.
 fn def_id_debug(def_id: rustc_hir::def_id::DefId, f: &mut fmt::Formatter<'_>) -> fmt::Result {
     write!(f, "DefId({}:{}", def_id.krate, def_id.index.index())?;
     tls::with_opt(|opt_tcx| {
@@ -58,5 +58,4 @@ pub fn setup_callbacks() {
     rustc_span::SPAN_DEBUG.swap(&(span_debug as fn(_, &mut fmt::Formatter<'_>) -> _));
     rustc_hir::def_id::DEF_ID_DEBUG.swap(&(def_id_debug as fn(_, &mut fmt::Formatter<'_>) -> _));
     TRACK_DIAGNOSTICS.swap(&(track_diagnostic as fn(&_)));
-    rustc::ty::RESOLVE_INSTANCE.swap(&(rustc_ty::instance::resolve_instance as _));
 }