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 U16.Insts.Dec2flt_modelNumImpTraitsCastIntoI16.cast
(self : Std.U16) : Result Std.I16 := do
ok (UScalar.hcast .I16 self)Other extracted objects at this span
Source details
| Declaration | U16.Insts.Dec2flt_modelNumImpTraitsCastIntoI16.cast |
|---|---|
| File | num/imp/../../traits.rs |
| Lines | 46:16–48:17 |
| Program version | Preparation 1 |