Skip to main content Module type_env Copy item path Source use std::iter ; π use std::ops::ControlFlow ; π use flux_common::bug; π use flux_common::bug; π use flux_common::dbg::SpanTrace; π use flux_common::dbg::debug_assert_eq3; π use flux_common::tracked_span_bug; π use flux_common::tracked_span_dbg_assert_eq; π use flux_infer::infer::ConstrReason; π use flux_infer::infer::InferCtxt; π use flux_infer::infer::InferCtxtAt; π use flux_infer::infer::InferCtxtRoot; π use flux_infer::infer::InferResult; π use flux_infer::refine_tree::Scope; π use flux_macros::DebugAsJson ; π use flux_middle::PlaceExt as _; π use flux_middle::global_env::GlobalEnv; π use flux_middle::pretty::PrettyCx; π use flux_middle::pretty::PrettyNested; π use flux_middle::queries::QueryResult; π use flux_middle::rty::BaseTy; π use flux_middle::rty::Binder; π use flux_middle::rty::BoundReftKind; π use flux_middle::rty::BoundVariableKind; π use flux_middle::rty::Ctor; π use flux_middle::rty::Expr; π use flux_middle::rty::ExprKind; π use flux_middle::rty::FnOutput; π use flux_middle::rty::FnSig; π use flux_middle::rty::GenericArg; π use flux_middle::rty::HoleKind; π use flux_middle::rty::INNERMOST; π use flux_middle::rty::Lambda; π use flux_middle::rty::List; π use flux_middle::rty::Loc; π use flux_middle::rty::Mutability; π use flux_middle::rty::Path; π use flux_middle::rty::PolyFnSig; π use flux_middle::rty::PtrKind; π use flux_middle::rty::Region; π use flux_middle::rty::SortCtor; π use flux_middle::rty::SubsetTy; π use flux_middle::rty::SubsetTyCtor; π use flux_middle::rty::Ty; π use flux_middle::rty::TyKind; π use flux_middle::rty::VariantIdx; π use flux_middle::rty::canonicalize::Hoister; π use flux_middle::rty::canonicalize::LocalHoister; π use flux_middle::rty::fold::FallibleTypeFolder; π use flux_middle::rty::fold::TypeFoldable; π use flux_middle::rty::fold::TypeVisitable; π use flux_middle::rty::fold::TypeVisitor; π use flux_middle::rty::region_matching::rty_match_regions; π use flux_middle::rty::region_matching::ty_match_regions; π use flux_rustc_bridge; π use flux_rustc_bridge::mir::BasicBlock; π use flux_rustc_bridge::mir::Body; π use flux_rustc_bridge::mir::Local; π use flux_rustc_bridge::mir::LocalDecl; π use flux_rustc_bridge::mir::LocalDecls; π use flux_rustc_bridge::mir::Place; π use flux_rustc_bridge::mir::PlaceElem; π use flux_rustc_bridge::ty; π use itertools::Itertools; π use itertools::izip; π use rustc_data_structures::unord::UnordMap; π use rustc_index::IndexSlice; π use rustc_index::IndexVec; π use rustc_middle::mir::RETURN_PLACE; π use rustc_middle::ty::TyCtxt; π use rustc_span::Span; π use rustc_span::Symbol; π use rustc_type_ir::BoundVar; π use serde::Serialize ; π use serde::Serialize ; π use self::place_ty::LocKind ; π use self::place_ty::PlacesTree ; π use super::rty::Sort; π place_ty π pretty π BasicBlockEnv BasicBlockEnvData π BasicBlockEnvShape TypeEnv TypeEnvBind π TypeEnvTrace A very explicit representation of TypeEnv for debugging/tracing/serialization ONLY. LocInfo π PtrToRefBound π generalize_fn_sig π Generalizes a fn pointer signature to one with the same (rust) shape where all refinements are
holes, e.g., for<n> fn(i32[n]) -> i32[n + 1] becomes fn({v. i32[v] | *}) -> {v. i32[v] | *}.
The refinement params of the signature are dropped, and so are the requires, ensures and
no_panic (which could mention them). The region vars are kept: they come before the
refinement params in the binder, so dropping the latter doesnβt shift them. loc_info π loc_name π loc_span π