Skip to main content Module valtree Copy item path Source use std::fmt ; ๐ use std::ops::Deref ; ๐ use rustc_abi::FIRST_VARIANT ; ๐ use rustc_abi::VariantIdx ; ๐ use rustc_data_structures::intern::Interned ; ๐ use rustc_hir::def::Namespace ; ๐ use rustc_macros::Lift ; ๐ use rustc_macros::StableHash ; ๐ use rustc_macros::TyDecodable ; ๐ use rustc_macros::TyEncodable ; ๐ use rustc_macros::TypeFoldable ; ๐ use rustc_macros::TypeVisitable ; ๐ use rustc_macros::extension ; ๐ use rustc_span::bug ; ๐ use super::ScalarInt ; ๐ use crate::mir::interpret::ErrorHandled ; ๐ use crate::mir::interpret::Scalar ; ๐ use crate::ty::print::FmtPrinter ; ๐ use crate::ty::print::PrettyPrinter ; ๐ use crate::ty ; ๐ use crate::ty::Ty ; ๐ use crate::ty::TyCtxt ; ๐ use crate::ty::ValTreeKind ; ๐ ValTree An interned valtree. Use this rather than ValTreeKind, whenever possible. Value A type-level constant value. ValTreeKindExt ConstToValTreeResult Ok(Err(ty)) indicates the constant was fine, but the valtree couldnโt be constructed
because the value contains something of type ty that is not valtree-compatible.
The caller can then show an appropriate error; the query does not have the
necessary context to give good user-facing errors for this case.