Expand description
Check the bodies of consts, statics and const fns for illegal operations.
This module will eventually replace the parts of qualify_consts.rs that check whether a local
has interior mutability or needs to be dropped, as well as the visitor that emits errors when
it finds operations that are invalid in a certain context.
Re-exportsΒ§
use rustc_attr_ir::find_attr;πuse rustc_errors::DiagCtxtHandle;πuse rustc_hir as hir;πuse rustc_hir::def_id::DefId;πuse rustc_hir::def_id::LocalDefId;πuse rustc_middle::mir;πuse rustc_middle::ty;πuse rustc_middle::ty::PolyFnSig;πuse rustc_middle::ty::TyCtxt;πuse rustc_span::Symbol;πuse rustc_span::bug;πpub use self::qualifs::Qualif;
ModulesΒ§
- check
- The
Visitorresponsible for actually checking amir::Bodyfor invalid operations. - ops π
- Concrete error types for all operations which may be invalid in a certain const context.
- post_
drop_ elaboration - qualifs
- Structural const qualification.
- resolver π
- Propagate
Qualifs between locals and query the results.
StructsΒ§
- ConstCx
- Information about the item currently being const-checked, as well as a reference to the global context.
FunctionsΒ§
- is_
fn_ or_ trait_ safe_ to_ expose_ on_ stable - Returns
trueif the givendef_id(trait or function) is βsafe to expose on stableβ. - rustc_
allow_ const_ fn_ unstable