Module rustc_passes::rvalue_promotion[][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?

Re-exports

use rustc::ty::cast::CastKind;
use rustc::hir::def::Def;
use rustc::hir::def::CtorKind;
use rustc::hir::def_id::DefId;
use rustc::hir::map::blocks::FnLikeNode;
use rustc::middle::expr_use_visitor as euv;
use rustc::middle::mem_categorization as mc;
use rustc::middle::mem_categorization::Categorization;
use rustc::ty;
use rustc::ty::Ty;
use rustc::ty::TyCtxt;
use rustc::ty::maps::Providers;
use rustc::ty::subst::Substs;
use rustc::util::nodemap::ItemLocalSet;
use rustc::util::nodemap::NodeSet;
use rustc::hir;
use rustc_data_structures::sync::Lrc;
use syntax::ast;
use syntax::attr;
use syntax_pos::Span;
use syntax_pos::DUMMY_SP;
use rustc::hir::intravisit;
use rustc::hir::intravisit::Visitor;
use rustc::hir::intravisit::NestedVisitorMap;

Structs

CheckCrateVisitor [
Experimental
]

Functions

check_adjustments [
Experimental
]

Check the adjustments of an expression

check_crate [
Experimental
]
check_expr [
Experimental
]

This function is used to enforce the constraints on const/static items. It walks through the value of the item walking down the expression and evaluating every nested expression. If the expression is not part of a const/static item, it is qualified for promotion instead of producing errors.

const_is_rvalue_promotable_to_static [
Experimental
]
provide [
Experimental
]
rvalue_promotable_map [
Experimental
]