Skip to main content Module helpers Copy item path Source use std::num::NonZero ; π use std::sync::Mutex ; π use std::assert_matches ; π use std::cmp ; π use std::iter ; π use rand::Rng; π use rustc_abi::Align; π use rustc_abi::ExternAbi; π use rustc_abi::FieldIdx; π use rustc_abi::FieldsShape; π use rustc_abi::Size; π use rustc_abi::Variants; π use rustc_data_structures::fx::FxBuildHasher; π use rustc_data_structures::fx::FxHashSet; π use rustc_hir::def::DefKind; π use rustc_hir::def::Namespace; π use rustc_hir::def_id::CRATE_DEF_INDEX; π use rustc_hir::def_id::CrateNum; π use rustc_hir::def_id::DefId; π use rustc_hir::def_id::LOCAL_CRATE; π use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrFlags; π use rustc_middle::middle::dependency_format::Linkage; π use rustc_middle::middle::exported_symbols::ExportedSymbol; π use rustc_middle::ty::layout::LayoutOf; π use rustc_middle::ty::layout::TyAndLayout; π use rustc_middle::ty; π use rustc_middle::ty::FnSigKind; π use rustc_middle::ty::IntTy; π use rustc_middle::ty::Ty; π use rustc_middle::ty::TyCtxt; π use rustc_middle::ty::UintTy; π use rustc_span::Span; π use rustc_span::Symbol; π use rustc_structures::CrateType; π use rustc_symbol_mangling::mangle_internal_symbol; π use rustc_target::spec::Os; π use crate ::*; π EvalContextExt ToU64 Similarly, a maximum address size of u64 is assumed widely here, so letβs have ergonomic
conversion from usize to u64. ToUsize We donβt support 16-bit systems, so letβs have ergonomic conversion from u32 to usize. bool_to_simd_element π is_no_core Check whether the local crate has the #![no_core] attribute. isolation_abort_error iter_exported_symbols Call f for each exported symbol. path_ty_layout Gets the layout of a type at a path. resolve_path Gets an instance for a path. try_resolve_did π Gets an instance for a path. try_resolve_path Gets an instance for a path; fails gracefully if the path does not exist. windows_check_buffer_size π Check whether an operation that writes to a target buffer was successful.
Accordingly select return value.
Local helper function to be used in Windows shims.