Source context

Program Rust

CastInto

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

15 // every implementation here is a primitive Copy type.  Removing that redundant16 // supertrait changes no call or value but prevents Aeneas from emitting two17 // identically named `Copy` fields for `Self` and `T` in the Lean structure.18 pub trait CastInto<T: Copy> {19     fn cast(self) -> T;20 }21 22 /// Collection of traits that allow us to be generic over integer size.23 // The accepted observations contain no formatting behavior.  Removing the

Aeneas declaration

The Lean below was mechanically extracted by Aeneas from Rust.

structure num.imp.traits.CastInto (Self : Type) (T : Type) where
  coremarkerCopyInst : core.marker.Copy T
  cast : Self → Result T
Source details
Declarationnum.imp.traits.CastInto
Filenum/imp/../../traits.rs
Lines18:0–20:1
Program versionOriginal program