Skip to main content

Module tls

Module tls 

Source

Re-exportsΒ§

use rustc_data_structures::sync; πŸ”’
use super::GlobalCtxt; πŸ”’
use super::TyCtxt; πŸ”’
use crate::dep_graph::TaskDepsRef; πŸ”’
use crate::query::QueryJobId; πŸ”’
use rustc_thread_pool::tlv::TLV; πŸ”’

StructsΒ§

ImplicitCtxt
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.

FunctionsΒ§

downcast πŸ”’ ⚠
enter_context
Sets context as the new current ImplicitCtxt for the duration of the function f.
erase πŸ”’
with
Allows access to the TyCtxt in the current ImplicitCtxt. Panics if there is no ImplicitCtxt available.
with_context
Allows access to the current ImplicitCtxt. Panics if there is no ImplicitCtxt available.
with_context_opt
Allows access to the current ImplicitCtxt in a closure if one is available.
with_opt
Allows access to the TyCtxt in the current ImplicitCtxt. The closure is passed None if there is no ImplicitCtxt available.