Why this fires¶
value as? T promises an exact, runtime-checked conversion. The diagnostic
fires when the source and destination have no value-preserving checked path.
let value = "42" as? int // error[TE836]: parsing is not castingFix it¶
Use parse for text, try_into for domain values, or choose a numeric cast
policy when information may be discarded.
let value = "42".parse::<int>()?