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 U32.Insts.Dec2flt_modelNumImpTraitsCastIntoI16.cast
  (self : Std.U32) : Result Std.I16 := do
  ok (UScalar.hcast .I16 self)
Other extracted objects at this span

U16.Insts.Dec2flt_modelNumImpTraitsCastIntoI16.cast

U64.Insts.Dec2flt_modelNumImpTraitsCastIntoI16.cast

Source details
DeclarationU32.Insts.Dec2flt_modelNumImpTraitsCastIntoI16.cast
Filenum/imp/../../traits.rs
Lines46:16–48:17
Program versionPreparation 1