Struct rustc_interface::Queries
source · [−]pub struct Queries<'tcx> {Show 14 fields
compiler: &'tcx Compiler,
gcx: OnceCell<GlobalCtxt<'tcx>>,
queries: OnceCell<TcxQueries<'tcx>>,
arena: WorkerLocal<Arena<'tcx>>,
hir_arena: WorkerLocal<Arena<'tcx>>,
dep_graph_future: Query<Option<DepGraphFuture>>,
parse: Query<Crate>,
crate_name: Query<String>,
register_plugins: Query<(Crate, Lrc<LintStore>)>,
expansion: Query<(Lrc<Crate>, Rc<RefCell<BoxedResolver>>, Lrc<LintStore>)>,
dep_graph: Query<DepGraph>,
prepare_outputs: Query<OutputFilenames>,
global_ctxt: Query<QueryContext<'tcx>>,
ongoing_codegen: Query<Box<dyn Any>>,
}
Fields
compiler: &'tcx Compiler
gcx: OnceCell<GlobalCtxt<'tcx>>
queries: OnceCell<TcxQueries<'tcx>>
arena: WorkerLocal<Arena<'tcx>>
hir_arena: WorkerLocal<Arena<'tcx>>
dep_graph_future: Query<Option<DepGraphFuture>>
parse: Query<Crate>
crate_name: Query<String>
register_plugins: Query<(Crate, Lrc<LintStore>)>
expansion: Query<(Lrc<Crate>, Rc<RefCell<BoxedResolver>>, Lrc<LintStore>)>
dep_graph: Query<DepGraph>
prepare_outputs: Query<OutputFilenames>
global_ctxt: Query<QueryContext<'tcx>>
ongoing_codegen: Query<Box<dyn Any>>
Implementations
sourceimpl<'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<&Query<Option<DepGraphFuture>>>
pub fn parse(&self) -> Result<&Query<Crate>>
pub fn register_plugins(&self) -> Result<&Query<(Crate, Lrc<LintStore>)>>
pub fn crate_name(&self) -> Result<&Query<String>>
pub fn expansion(
&self
) -> Result<&Query<(Lrc<Crate>, Rc<RefCell<BoxedResolver>>, Lrc<LintStore>)>>
fn dep_graph(&self) -> Result<&Query<DepGraph>>
pub fn prepare_outputs(&self) -> Result<&Query<OutputFilenames>>
pub fn global_ctxt(&'tcx self) -> Result<&'_ Query<QueryContext<'tcx>>>
pub fn ongoing_codegen(&'tcx self) -> Result<&'_ Query<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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn 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: 32632 bytes