Struct rustc_interface::queries::Queries
source · pub struct Queries<'tcx> {
compiler: &'tcx Compiler,
gcx_cell: OnceCell<GlobalCtxt<'tcx>>,
arena: WorkerLocal<Arena<'tcx>>,
hir_arena: WorkerLocal<Arena<'tcx>>,
dep_graph_future: Query<Option<DepGraphFuture>>,
parse: Query<Crate>,
pre_configure: Query<(Crate, AttrVec)>,
crate_name: Query<Symbol>,
register_plugins: Query<(Crate, AttrVec, Lrc<LintStore>)>,
dep_graph: Query<DepGraph>,
gcx: Query<&'tcx GlobalCtxt<'tcx>>,
ongoing_codegen: Query<Box<dyn Any>>,
}
Fields§
§compiler: &'tcx Compiler
§gcx_cell: OnceCell<GlobalCtxt<'tcx>>
§arena: WorkerLocal<Arena<'tcx>>
§hir_arena: WorkerLocal<Arena<'tcx>>
§dep_graph_future: Query<Option<DepGraphFuture>>
§parse: Query<Crate>
§pre_configure: Query<(Crate, AttrVec)>
§crate_name: Query<Symbol>
§register_plugins: Query<(Crate, AttrVec, Lrc<LintStore>)>
§dep_graph: Query<DepGraph>
§gcx: Query<&'tcx GlobalCtxt<'tcx>>
§ongoing_codegen: Query<Box<dyn Any>>
Implementations§
source§impl<'tcx> Queries<'tcx>
impl<'tcx> Queries<'tcx>
pub fn new(compiler: &'tcx Compiler) -> Queries<'tcx>
fn session(&self) -> &Lrc<Session>
fn codegen_backend(&self) -> &Lrc<Box<dyn CodegenBackend>>
fn dep_graph_future(&self) -> Result<QueryResult<'_, Option<DepGraphFuture>>>
pub fn parse(&self) -> Result<QueryResult<'_, Crate>>
pub fn pre_configure(&self) -> Result<QueryResult<'_, (Crate, AttrVec)>>
pub fn register_plugins( &self ) -> Result<QueryResult<'_, (Crate, AttrVec, Lrc<LintStore>)>>
fn crate_name(&self) -> Result<QueryResult<'_, Symbol>>
fn dep_graph(&self) -> Result<QueryResult<'_, DepGraph>>
pub fn global_ctxt( &'tcx self ) -> Result<QueryResult<'_, &'tcx GlobalCtxt<'tcx>>>
pub fn ongoing_codegen(&'tcx self) -> Result<QueryResult<'_, Box<dyn Any>>>
sourcefn check_for_rustc_errors_attr(tcx: TyCtxt<'_>)
fn check_for_rustc_errors_attr(tcx: TyCtxt<'_>)
Check for the #[rustc_error]
annotation, which forces an error in codegen. This is used
to write UI tests that actually test that compilation succeeds without reporting
an error.
pub fn linker(&'tcx self) -> Result<Linker>
Auto Trait Implementations§
impl<'tcx> !RefUnwindSafe for Queries<'tcx>
impl<'tcx> !Send for Queries<'tcx>
impl<'tcx> !Sync for Queries<'tcx>
impl<'tcx> Unpin for Queries<'tcx>
impl<'tcx> !UnwindSafe for Queries<'tcx>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size:65256 bytes