Skip to main content

PRIMITIVE_CONVERSION_TARGETS

Constant PRIMITIVE_CONVERSION_TARGETS 

Source
pub const PRIMITIVE_CONVERSION_TARGETS: &[&str];
Expand description

The set of primitive type names that can appear as the callee of a canonical primitive associated conversion (Prim.from(x) / Prim.try_from).

Restricted to the conversion targets the canonical matrix defines (register_canonical_conversions): Int/Float (numeric widening + TryFrom[String]), String (From[Char]). Sized primitives (Int64, …) are conversion targets too, but are not in the resolver’s type-name vocab, so they never reach codegen as an associated-call callee; Int/Float/ String are the v1-reachable callees.