[−][src]Module rustc::ty::context::tls
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Structs
ImplicitCtxt |
[ Experimental ] This is the implicit state of rustc. It contains the current TyCtxt and query. It is updated when creating a local interner or executing a new query. Whenever there's a TyCtxt value available you should also have access to an ImplicitCtxt through the functions in this module. |
Constants
TLV |
[ Experimental ]
|
Statics
GCX_PTR |
[ Experimental ]
|
Functions
enter_context |
[ Experimental ] Sets |
enter_global |
[ Experimental ] Enters GlobalCtxt by setting up libsyntax callbacks and
creating a initial TyCtxt and ImplicitCtxt.
This happens once per rustc session and TyCtxts only exists
inside the |
get_tlv |
[ Experimental ] This is used to get the pointer to the current ImplicitCtxt. |
set_tlv |
[ Experimental ] Sets TLV to |
span_debug |
[ Experimental ] This is a callback from libsyntax as it cannot access the implicit state in librustc otherwise |
track_diagnostic |
[ Experimental ] This is a callback from libsyntax as it cannot access the implicit state in librustc otherwise. It is used to when diagnostic messages are emitted and stores them in the current query, if there is one. |
with |
[ Experimental ] Allows access to the TyCtxt in the current ImplicitCtxt. Panics if there is no ImplicitCtxt available |
with_context |
[ Experimental ] Allows access to the current ImplicitCtxt. Panics if there is no ImplicitCtxt available |
with_context_opt |
[ Experimental ] Allows access to the current ImplicitCtxt in a closure if one is available |
with_fully_related_context |
[ Experimental ] Allows access to the current ImplicitCtxt whose tcx field has the same global interner and local interner as the tcx argument passed in. This means the closure is given an ImplicitCtxt with the same 'tcx and 'gcx lifetimes as the TyCtxt passed in. This will panic if you pass it a TyCtxt which has a different global interner or a different local interner from the current ImplicitCtxt's tcx field. |
with_global⚠ |
[ Experimental ] Creates a TyCtxt and ImplicitCtxt based on the GCX_PTR thread local. This is used in the deadlock handler. |
with_opt |
[ Experimental ] Allows access to the TyCtxt in the current ImplicitCtxt. The closure is passed None if there is no ImplicitCtxt available |
with_related_context |
[ Experimental ] Allows access to the current ImplicitCtxt whose tcx field has the same global interner as the tcx argument passed in. This means the closure is given an ImplicitCtxt with the same 'gcx lifetime as the TyCtxt passed in. This will panic if you pass it a TyCtxt which has a different global interner from the current ImplicitCtxt's tcx field. |
with_thread_locals |
[ Experimental ] Sets up the callbacks from libsyntax on the current thread |