Struct rustc_mir::hair::cx::Cx [−][src]
pub struct Cx<'a, 'gcx: 'a + 'tcx, 'tcx: 'a> {
tcx: TyCtxt<'a, 'gcx, 'tcx>,
infcx: &'a InferCtxt<'a, 'gcx, 'tcx>,
pub root_lint_level: NodeId,
pub param_env: ParamEnv<'gcx>,
pub identity_substs: &'gcx Substs<'gcx>,
pub region_scope_tree: Lrc<ScopeTree>,
pub tables: &'a TypeckTables<'gcx>,
constness: Constness,
pub body_owner_kind: BodyOwnerKind,
check_overflow: bool,
}🔬 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?
Fields
tcx: TyCtxt<'a, 'gcx, 'tcx>
🔬 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?
infcx: &'a InferCtxt<'a, 'gcx, 'tcx>
🔬 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?
root_lint_level: NodeId
🔬 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?
param_env: ParamEnv<'gcx>
🔬 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?
identity_substs: &'gcx Substs<'gcx>
🔬 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?
Identity Substs for use with const-evaluation.
region_scope_tree: Lrc<ScopeTree>
🔬 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?
tables: &'a TypeckTables<'gcx>
🔬 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?
constness: Constness
🔬 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?
This is Constness::Const if we are compiling a static,
const, or the body of a const fn.
body_owner_kind: BodyOwnerKind
🔬 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?
What kind of body is being compiled.
check_overflow: bool
🔬 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?
True if this constant/function needs overflow checks.
Methods
impl<'a, 'gcx, 'tcx> Cx<'a, 'gcx, 'tcx>[src]
impl<'a, 'gcx, 'tcx> Cx<'a, 'gcx, 'tcx>pub fn new(
infcx: &'a InferCtxt<'a, 'gcx, 'tcx>,
src_id: NodeId
) -> Cx<'a, 'gcx, 'tcx>[src]
pub fn new(
infcx: &'a InferCtxt<'a, 'gcx, 'tcx>,
src_id: NodeId
) -> Cx<'a, 'gcx, 'tcx>🔬 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?
impl<'a, 'gcx, 'tcx> Cx<'a, 'gcx, 'tcx>[src]
impl<'a, 'gcx, 'tcx> Cx<'a, 'gcx, 'tcx>pub fn mirror<M: Mirror<'tcx>>(&mut self, ast: M) -> M::Output[src]
pub fn mirror<M: Mirror<'tcx>>(&mut self, ast: M) -> M::Output🔬 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?
Normalizes ast into the appropriate mirror type.
pub fn usize_ty(&mut self) -> Ty<'tcx>[src]
pub fn usize_ty(&mut self) -> Ty<'tcx>🔬 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?
pub fn usize_literal(&mut self, value: u64) -> Literal<'tcx>[src]
pub fn usize_literal(&mut self, value: u64) -> Literal<'tcx>🔬 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?
pub fn bool_ty(&mut self) -> Ty<'tcx>[src]
pub fn bool_ty(&mut self) -> Ty<'tcx>🔬 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?
pub fn unit_ty(&mut self) -> Ty<'tcx>[src]
pub fn unit_ty(&mut self) -> Ty<'tcx>🔬 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?
pub fn true_literal(&mut self) -> Literal<'tcx>[src]
pub fn true_literal(&mut self) -> Literal<'tcx>🔬 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?
pub fn false_literal(&mut self) -> Literal<'tcx>[src]
pub fn false_literal(&mut self) -> Literal<'tcx>🔬 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?
pub fn const_eval_literal(
&mut self,
lit: &'tcx LitKind,
ty: Ty<'tcx>,
sp: Span,
neg: bool
) -> Literal<'tcx>[src]
pub fn const_eval_literal(
&mut self,
lit: &'tcx LitKind,
ty: Ty<'tcx>,
sp: Span,
neg: bool
) -> Literal<'tcx>🔬 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?
pub fn pattern_from_hir(&mut self, p: &Pat) -> Pattern<'tcx>[src]
pub fn pattern_from_hir(&mut self, p: &Pat) -> Pattern<'tcx>🔬 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?
pub fn trait_method(
&mut self,
trait_def_id: DefId,
method_name: &str,
self_ty: Ty<'tcx>,
params: &[Kind<'tcx>]
) -> (Ty<'tcx>, Literal<'tcx>)[src]
pub fn trait_method(
&mut self,
trait_def_id: DefId,
method_name: &str,
self_ty: Ty<'tcx>,
params: &[Kind<'tcx>]
) -> (Ty<'tcx>, Literal<'tcx>)🔬 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?
pub fn all_fields(
&mut self,
adt_def: &AdtDef,
variant_index: usize
) -> Vec<Field>[src]
pub fn all_fields(
&mut self,
adt_def: &AdtDef,
variant_index: usize
) -> Vec<Field>🔬 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?
pub fn needs_drop(&mut self, ty: Ty<'tcx>) -> bool[src]
pub fn needs_drop(&mut self, ty: Ty<'tcx>) -> bool🔬 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?
fn lint_level_of(&self, node_id: NodeId) -> LintLevel[src]
fn lint_level_of(&self, node_id: NodeId) -> LintLevel🔬 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?
pub fn tcx(&self) -> TyCtxt<'a, 'gcx, 'tcx>[src]
pub fn tcx(&self) -> TyCtxt<'a, 'gcx, 'tcx>🔬 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?
pub fn tables(&self) -> &'a TypeckTables<'gcx>[src]
pub fn tables(&self) -> &'a TypeckTables<'gcx>🔬 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?
pub fn check_overflow(&self) -> bool[src]
pub fn check_overflow(&self) -> bool🔬 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?
pub fn type_moves_by_default(&self, ty: Ty<'tcx>, span: Span) -> bool[src]
pub fn type_moves_by_default(&self, ty: Ty<'tcx>, span: Span) -> bool🔬 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?