Module rustc_mir::transform::qualify_consts [−][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?
A pass that qualifies constness of temporaries in constants, static initializers and functions and also drives promotion.
The Qualif flags below can be used to also provide better diagnostics as to why a constant rvalue wasn't promoted.
Re-exports
use rustc_data_structures::bitvec::BitVector; |
use rustc_data_structures::indexed_set::IdxSetBuf; |
use rustc_data_structures::indexed_vec::IndexVec; |
use rustc_data_structures::indexed_vec::Idx; |
use rustc_data_structures::fx::FxHashSet; |
use rustc_data_structures::fx::FxHashSet; |
use rustc::hir; |
use rustc::hir::def_id::DefId; |
use rustc::middle::const_val::ConstVal; |
use rustc::traits; |
use rustc::traits::TraitEngine; |
use rustc::ty; |
use rustc::ty::TyCtxt; |
use rustc::ty::Ty; |
use rustc::ty::TypeFoldable; |
use rustc::ty::cast::CastTy; |
use rustc::ty::query::Providers; |
use rustc::mir::*; |
use rustc::mir::traversal::ReversePostorder; |
use rustc::mir::visit::PlaceContext; |
use rustc::mir::visit::Visitor; |
use rustc::middle::lang_items; |
use rustc_target::spec::abi::Abi; |
use syntax::attr; |
use syntax::ast::LitKind; |
use syntax::feature_gate::UnstableFeatures; |
use syntax::feature_gate::feature_err; |
use syntax::feature_gate::emit_feature_err; |
use syntax::feature_gate::GateIssue; |
use syntax_pos::Span; |
use syntax_pos::DUMMY_SP; |
use std::fmt; |
use rustc_data_structures::sync::Lrc; |
use std::usize; |
use transform::MirPass; |
use transform::MirSource; |
use super::promote_consts; |
use super::promote_consts::Candidate; |
use super::promote_consts::TempState; |
Structs
Qualif |
[ Experimental ]
|
Qualifier |
[ Experimental ]
|
QualifyAndPromoteConstants |
[ Experimental ]
|
Enums
Mode |
[ Experimental ] What kind of item we are in. |
Functions
args_required_const |
[ Experimental ]
|
mir_const_qualif |
[ Experimental ]
|
provide |
[ Experimental ]
|