Source context

Program Rust

cast

This Rust is the input prepared for Aeneas. Modeling choices explains the adaptations from the production source.

43     ($($ty:ty),+) => {44         $(45             impl CastInto<i16> for $ty {46                 fn cast(self) -> i16 {47                     self as i1648                 }49             }50 51             impl Int for $ty {

Aeneas declaration

The Lean below was mechanically extracted by Aeneas from Rust.

def U64.Insts.Dec2flt_modelNumImpTraitsCastIntoI16.cast
  (self : Std.U64) : Result Std.I16 := do
  ok (UScalar.hcast .I16 self)
Source details
DeclarationU64.Insts.Dec2flt_modelNumImpTraitsCastIntoI16.cast
Filenum/imp/../../traits.rs
Lines46:16–48:17
Program versionOriginal program