Struct rustc::middle::mem_categorization::MemCategorizationContext
[−]
[src]
pub struct MemCategorizationContext<'a, 'gcx: 'a + 'tcx, 'tcx: 'a> { pub tcx: TyCtxt<'a, 'gcx, 'tcx>, pub region_scope_tree: &'a ScopeTree, pub tables: &'a TypeckTables<'tcx>, // some fields omitted }
🔬 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?
region_scope_tree: &'a 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<'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?
Methods
impl<'a, 'tcx> MemCategorizationContext<'a, 'tcx, 'tcx>
[src]
pub fn new(
tcx: TyCtxt<'a, 'tcx, 'tcx>,
region_scope_tree: &'a ScopeTree,
tables: &'a TypeckTables<'tcx>,
rvalue_promotable_map: Option<Rc<ItemLocalSet>>
) -> MemCategorizationContext<'a, 'tcx, 'tcx>
[src]
tcx: TyCtxt<'a, 'tcx, 'tcx>,
region_scope_tree: &'a ScopeTree,
tables: &'a TypeckTables<'tcx>,
rvalue_promotable_map: Option<Rc<ItemLocalSet>>
) -> MemCategorizationContext<'a, 'tcx, '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> MemCategorizationContext<'a, 'gcx, 'tcx>
[src]
pub fn with_infer(
infcx: &'a InferCtxt<'a, 'gcx, 'tcx>,
region_scope_tree: &'a ScopeTree,
tables: &'a TypeckTables<'tcx>
) -> MemCategorizationContext<'a, 'gcx, 'tcx>
[src]
infcx: &'a InferCtxt<'a, 'gcx, 'tcx>,
region_scope_tree: &'a ScopeTree,
tables: &'a TypeckTables<'tcx>
) -> MemCategorizationContext<'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?
Creates a MemCategorizationContext
during type inference.
This is used during upvar analysis and a few other places.
Because the typeck tables are not yet complete, the results
from the analysis must be used with caution:
- rvalue promotions are not known, so the lifetimes of temporaries may be overly conservative;
- similarly, as the results of upvar analysis are not yet known, the results around upvar accesses may be incorrect.
pub fn type_moves_by_default(
&self,
param_env: ParamEnv<'tcx>,
ty: Ty<'tcx>,
span: Span
) -> bool
[src]
&self,
param_env: ParamEnv<'tcx>,
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?
pub fn node_ty(&self, hir_id: HirId) -> McResult<Ty<'tcx>>
[src]
🔬 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 expr_ty(&self, expr: &Expr) -> McResult<Ty<'tcx>>
[src]
🔬 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 expr_ty_adjusted(&self, expr: &Expr) -> McResult<Ty<'tcx>>
[src]
🔬 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 cat_expr(&self, expr: &Expr) -> McResult<cmt<'tcx>>
[src]
🔬 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 cat_expr_adjusted(
&self,
expr: &Expr,
previous: cmt<'tcx>,
adjustment: &Adjustment<'tcx>
) -> McResult<cmt<'tcx>>
[src]
&self,
expr: &Expr,
previous: cmt<'tcx>,
adjustment: &Adjustment<'tcx>
) -> McResult<cmt<'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 cat_expr_unadjusted(&self, expr: &Expr) -> McResult<cmt<'tcx>>
[src]
🔬 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 cat_def(
&self,
id: NodeId,
span: Span,
expr_ty: Ty<'tcx>,
def: Def
) -> McResult<cmt<'tcx>>
[src]
&self,
id: NodeId,
span: Span,
expr_ty: Ty<'tcx>,
def: Def
) -> McResult<cmt<'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 temporary_scope(&self, id: ItemLocalId) -> Region<'tcx>
[src]
🔬 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?
Returns the lifetime of a temporary created by expr with id id
.
This could be 'static
if id
is part of a constant expression.
pub fn cat_rvalue_node(
&self,
id: NodeId,
span: Span,
expr_ty: Ty<'tcx>
) -> cmt<'tcx>
[src]
&self,
id: NodeId,
span: Span,
expr_ty: Ty<'tcx>
) -> cmt<'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 cat_rvalue(
&self,
cmt_id: NodeId,
span: Span,
temp_scope: Region<'tcx>,
expr_ty: Ty<'tcx>
) -> cmt<'tcx>
[src]
&self,
cmt_id: NodeId,
span: Span,
temp_scope: Region<'tcx>,
expr_ty: Ty<'tcx>
) -> cmt<'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 cat_field<N: ast_node>(
&self,
node: &N,
base_cmt: cmt<'tcx>,
f_name: Name,
f_ty: Ty<'tcx>
) -> cmt<'tcx>
[src]
&self,
node: &N,
base_cmt: cmt<'tcx>,
f_name: Name,
f_ty: Ty<'tcx>
) -> cmt<'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 cat_tup_field<N: ast_node>(
&self,
node: &N,
base_cmt: cmt<'tcx>,
f_idx: usize,
f_ty: Ty<'tcx>
) -> cmt<'tcx>
[src]
&self,
node: &N,
base_cmt: cmt<'tcx>,
f_idx: usize,
f_ty: Ty<'tcx>
) -> cmt<'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 cat_deref<N: ast_node>(
&self,
node: &N,
base_cmt: cmt<'tcx>,
implicit: bool
) -> McResult<cmt<'tcx>>
[src]
&self,
node: &N,
base_cmt: cmt<'tcx>,
implicit: bool
) -> McResult<cmt<'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 cat_imm_interior<N: ast_node>(
&self,
node: &N,
base_cmt: cmt<'tcx>,
interior_ty: Ty<'tcx>,
interior: InteriorKind
) -> cmt<'tcx>
[src]
&self,
node: &N,
base_cmt: cmt<'tcx>,
interior_ty: Ty<'tcx>,
interior: InteriorKind
) -> cmt<'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 cat_downcast_if_needed<N: ast_node>(
&self,
node: &N,
base_cmt: cmt<'tcx>,
variant_did: DefId
) -> cmt<'tcx>
[src]
&self,
node: &N,
base_cmt: cmt<'tcx>,
variant_did: DefId
) -> cmt<'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 cat_pattern<F>(&self, cmt: cmt<'tcx>, pat: &Pat, op: F) -> McResult<()> where
F: FnMut(cmt<'tcx>, &Pat),
[src]
F: FnMut(cmt<'tcx>, &Pat),
🔬 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?
Trait Implementations
impl<'a, 'gcx: 'a + 'tcx, 'tcx: 'a> Clone for MemCategorizationContext<'a, 'gcx, 'tcx>
[src]
fn clone(&self) -> MemCategorizationContext<'a, 'gcx, 'tcx>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more