Re-exportsยง
use rustc_abi::Scalar;๐use rustc_abi::Size;๐use rustc_abi::TagEncoding;๐use rustc_abi::Variants;๐use rustc_abi::WrappingRange;๐use rustc_attr_ir::lang_items::LangItem;๐use rustc_index::IndexVec;๐use rustc_middle::mir::visit::Visitor;๐use rustc_middle::ty::layout::PrimitiveExt;๐use rustc_middle::ty;๐use rustc_middle::ty::Ty;๐use rustc_middle::ty::TyCtxt;๐use rustc_middle::ty::TypingEnv;๐use rustc_span::bug;๐use tracing::debug;๐use crate::PassPolicy;๐use rustc_middle::mir::*;๐
Structsยง
- Check
Enums ๐ - This pass inserts checks for a valid enum discriminant where they are most likely to find UB, because checking everywhere like Miri would generate too much MIR.
- Enum
Finder ๐ - A Visitor that finds the construction of enums and evaluates which checks we should apply.
- TyAnd
Size ๐
Enumsยง
- Enum
Check ๐Type - Represent the different kind of enum checks we can insert.
Functionsยง
- insert_
direct_ ๐enum_ check - insert_
discr_ ๐cast_ to_ u128 - Inserts the cast of an operand (any type) to a u128 value that holds the discriminant value.
- insert_
niche_ ๐check - insert_
uninhabited_ ๐enum_ check - split_
block ๐