Struct rustc_interface::queries::Queries
source · pub struct Queries<'tcx> {
compiler: &'tcx Compiler,
gcx_cell: OnceLock<GlobalCtxt<'tcx>>,
arena: WorkerLocal<Arena<'tcx>>,
hir_arena: WorkerLocal<Arena<'tcx>>,
parse: Query<Crate>,
pre_configure: Query<(Crate, AttrVec)>,
gcx: Query<&'tcx GlobalCtxt<'tcx>>,
}
Fields§
§compiler: &'tcx Compiler
§gcx_cell: OnceLock<GlobalCtxt<'tcx>>
§arena: WorkerLocal<Arena<'tcx>>
§hir_arena: WorkerLocal<Arena<'tcx>>
§parse: Query<Crate>
§pre_configure: Query<(Crate, AttrVec)>
§gcx: Query<&'tcx GlobalCtxt<'tcx>>
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<dyn CodegenBackend>
pub fn parse(&self) -> Result<QueryResult<'_, Crate>>
pub fn pre_configure(&self) -> Result<QueryResult<'_, (Crate, AttrVec)>>
👎Deprecated: pre_configure may be made private in the future. If you need it please open an issue with your use case.
pub fn global_ctxt( &'tcx self ) -> Result<QueryResult<'_, &'tcx GlobalCtxt<'tcx>>>
pub fn ongoing_codegen(&'tcx self) -> Result<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, ongoing_codegen: Box<dyn Any>) -> 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: 65104 bytes