Source paths below are relative to langs/Rust/.
Install the compiler and see the Rust quick start for the Cargo dependencies.
nix profile install 'github:conao3/lean-leanfran/v<version>#leanfran'
<version> is the release of the crates. For embedded Lean blocks, install the Cargo command with nix profile install 'github:conao3/lean-leanfran/v<version>#cargo-leanfran' and use the Charon and Aeneas tools from the repository's nix develop .#rust environment.
The crates need Rust 1.88, and cargo-leanfran needs Rust 1.89. Generation needs lean and lake of Lean 4.35.0 on PATH.
Install the Rust dependencies before adding a block.
// build.rs
fn main() {
leanfran_build::Builder::new().compile().unwrap();
}
// src/lib.rs
leanfran::lean! {
/// Documentation of the module.
pub mod arith;
r#"
def double (n : Nat) : Nat := n + n
"#
}
Run leanfran --lang rust sync to check the Lean source and generate the Rust module. Then
cargo build builds the crate from those files, so arith::double(21u64.into()) is callable.
List the modules in leanfran.toml:
[[generate]]
lang = "rust"
lake-dir = "lean"
output-dir = "src/generated"
path = "crate::generated"
modules = ["Roman"]
leanfran generate builds the modules and writes src/generated/<module>.rs for each of them and a
mod.rs. Declare mod generated; in the crate and depend on leanfran. The
generate guide describes the keys.
samples/steps/ introduces the features one crate at a time, in 17 steps from a
first lean! block to a generic verified function. samples/ also has todo-cli
and word-count (lean!), roman-numerals (a lake project with committed generated modules),
and verified-rust, sorted-search, inventory and generic-search (Rust functions verified
in Lean, the last one generic).
leanfran --lang rust sync finds lean! blocks in the crate's sources, checks them in the
shared Lake workspace, and writes the Rust modules. Lean errors name the Rust source file and
line. imports names Lean modules; uses names other lean! blocks whose module is imported and
opened and whose generated types are shared.
List Lake dependencies in [[require]] of leanfran.toml. To keep handwritten Lean support
modules, put them in a separate Lake package and add a path dependency; do not edit the workspace.
| Lean | Rust |
|---|---|
Bool (and Decidable p) | bool |
Nat, Int | leanfran::Nat, leanfran::Int (arbitrary precision; From<u64>, TryFrom<Nat> for u64, Display, FromStr, arithmetic) |
UInt8…UInt64, USize | u8…u64, usize |
Int8…Int64, ISize | i8…i64, isize |
Float, Float32 | f64, f32 |
Char | char |
String | String (arguments take impl AsRef<str>) |
Unit | () |
List α, Array α | Vec<T> |
Option α | Option<T> |
Except ε α | Result<T, E> |
α × β | (A, B) |
Fin n (n reduces to a literal below 2^64) | usize, checked against n (panics when out of range) |
Fin n (n reduces to a literal of 2^64 or more) | leanfran::Nat, unchecked |
| a structure | a generated pub struct with snake_case fields |
| an inductive type | a generated pub enum (a field-less enum when every constructor is nullary) |
IO α | std::io::Result<T> (IO.Error becomes std::io::Error with Lean's message) |
Generated structs and enums derive Debug, Clone and PartialEq, plus Eq and Hash when
the Lean type has DecidableEq. Recursive fields are boxed (Box<Tree>).
A definition whose type uses anything else is not public; --output json lists it under
skipped with the reason: type variables, function types, Subtype, type families, proof
arguments, and argument types with proof fields (Rust could not keep their invariant). Type
arguments are dropped, and instance arguments of a concrete type are synthesized at generation
time. Names are the last components of the Lean name in snake_case relative to the module's
namespace (Point.add → point_add, find? → find_q, get! → get_bang, x' →
x_prime, keywords as r#type). Each function has a doc comment with its Lean name and type,
and #[leanfran::exported("<Lean name>")]. A @[csimp] replacement in the definition's module
is what the function runs.
A public function converts its arguments to Lean values and its result back on every call, which
costs time in proportion to their size. leanfran::Lean<L> keeps a value as the Lean object
instead. The module lean of a generated module has every public function again, taking Rust
values or handles and returning a handle:
use leanfran::Lean;
let mut snapshot: Lean<kernel::Snapshot> = kernel::lean::init();
let result = kernel::lean::transition(actor, &snapshot, command).get();
snapshot = kernel::lean::apply(snapshot, write);
L names the Lean type by the Rust type of the table above, with leanfran::List<T> for
List α, leanfran::Array<T> for Array α (both are Vec<T> as values) and
leanfran::Fin<N> for Fin n: Lean<List<Memory>>, Lean<Result<(Option<Memory>, Reply), Error>>.Lean::new(value) converts a Rust value once and get() converts the handle back.impl IntoLean<L>: the Rust value, &Lean<L> or Lean<L>.Lean<L> is Clone, Send and Sync. A clone refers to the same object. A handle can be
kept behind a Mutex and used from several threads. The objects of a handle have atomic
reference counts, and Lean functions that receive them build new objects instead of updating
in place.leanfran::Local<L> is the handle for one thread, returned by the functions of the module
local. It is neither Send nor Sync, and its objects keep the reference counts of one
thread, so a Lean function that receives the only handle of a value by value updates the value
in place:
use leanfran::Local;
let mut snapshot: Local<kernel::Snapshot> = kernel::local::init();
let result = kernel::local::transition(actor, &snapshot, command).get();
snapshot = kernel::local::apply(snapshot, write); // moved: the list is updated in place
&snapshot, or holding a clone, keeps the old value: the function then builds new
objects for what it changes.local.share() gives the Lean<L> of the value and lean.to_local() a Local<L> of a
shared value. The functions of both modules take both kinds of handle.leanfran::Owned<L> is a value with one owner that can move between threads and is still
updated in place. It is Send, not Sync and not Clone, and it lends the value as a Local
for the time of a closure:
use leanfran::Owned;
use std::sync::Mutex;
let engine = Mutex::new(Owned::<kernel::Snapshot>::new(kernel::init()));
let reply = engine.lock().unwrap().with(|snapshot| {
match kernel::local::transition(actor, &snapshot, command).get() {
Ok((write, reply)) => (kernel::local::apply(snapshot, write), Ok(reply)),
Err(error) => (snapshot, Err(error)),
}
});
Local that becomes the new value, and a result.Local made in the closure should be gone when it returns. One that is kept (in
a captured variable or in the result) is detected, and so is a Local from outside used in
the closure: what they share with the value is then marked as shared between threads. The
program stays correct, and those objects are no longer updated in place.owned.get() converts the value, owned.share() gives the Lean<L>, and
Owned::from(lean) takes a shared value.IO actions, polymorphic functions, functions implemented by Rust and types with proof fields
have no handle version.
One command (a scan and an update) on a snapshot of two-number structures in a List
(cargo run --release -p leanfran-public-test --bin handle-bench in langs/Rust):
| rows | Rust values | Lean | Local | Owned in a Mutex |
|---|---|---|---|---|
| 1 | 0.18 µs | 0.25 µs | 0.10 µs | 0.12 µs |
| 100 | 4.6 µs | 2.4 µs | 0.36 µs | 0.37 µs |
| 10,000 | 758 µs | 223 µs | 38 µs | 37 µs |
What remains with Local and Owned is the Lean code itself: a List is searched and rebuilt
cell by cell. A snapshot in an Array is written in one slot (Array.setIfInBounds on the only
reference).
rust_instances (from LeanRust.Instances, which lean! blocks that use it import) compiles
a polymorphic function for chosen types and makes it one generic Rust function:
leanfran::lean! {
pub mod sorting;
r#"
def largest {α : Type} [Ord α] [Inhabited α] (xs : List α) : α :=
xs.foldl (fun a b => if compare a b == .lt then b else a) default
rust_instances largest [Nat, String]
"#
}
fn main() {
assert_eq!(sorting::largest(vec!["b".to_string(), "a".to_string()]), "b");
}
rust_instances f [Nat, String] defines f.inst_Nat := @f Nat _ (the instances synthesized)
and f.inst_String; several type parameters take named arguments, rust_instances g [(α := Nat) (β := String)]. The Rust function largest<T: __leanfran_inst::Largest>(xs: Vec<T>) -> T
dispatches through a sealed trait implemented for the instantiated types only (another type is
a rustc error); the trait of a function with several type parameters is implemented for the
first one, with the others as associated types (T::T1). The instantiations are also public
functions (largest_inst_nat), and a @[csimp] lemma can replace one of them. A lake project
compiled with leanfran generate imports LeanRust.Instances from this repository's LeanRust
library.
sync writes each block's Rust module to .leanfran/rust/cache/<key>.rs in its crate and the
Lean sources to .leanfran/rust/workspace/LeanRustGen/ at the project root. Generated Rust starts with:
// Code generated by leanfran --lang rust (generator 8) from LeanRustGen.Embed.my_crate.h<hash>.arith. DO NOT EDIT.
Commit each crate's .leanfran/rust/cache/ and its ignore file, the root leanfran.manifest.json,
and leanfran.lock after check. Do not commit the workspace. Add .leanfran/rust/cache/** to
the crate's include when publishing it. Neither the build script nor rust-analyzer normally
runs Lean. If a block is missing or stale, run leanfran --lang rust sync and commit the refreshed
files. With LEANFRAN_AUTO_SYNC=1, the build script can run that command for blocks that do not
depend on a model of the same crate and are not from a registry crate.
Generated code builds for wasm32-unknown-unknown (for a browser through wasm-bindgen) with
leanfran = { version = "0.16.0", default-features = false }
Pure functions behave as on Unix. The IO actions that need an operating system (files,
directories, handles other than the standard streams, child processes, locks, the current
directory, random bytes, IO.Process.exit) return IO.Error.unsupportedOperation (Rust's
ErrorKind::Unsupported) with the message <operation> is not supported on wasm32-unknown-unknown. IO.getEnv returns none, the process id is 0, the monotonic clocks
stay at their start, dbgSleep returns at once, the standard input is empty, and the standard
output and error (with panic messages) are discarded.
Run the commands in the project, or pass --dir <dir>:
| Command | Effect |
|---|---|
leanfran --lang rust sync | Checks the Lean blocks and writes their code and leanfran.manifest.json. |
leanfran --lang rust check | Syncs, checks block theorems and function proofs in lean/Proofs/, and writes leanfran.lock. |
leanfran --lang rust status | Reports stale blocks and proof status without Lean or Lake. Use --output json for structured output. |
sync and check accept --verbose for Lake output. check and status accept
--require proved. The compiler runs cargo leanfran scan and cargo leanfran translate as
needed. Translation uses the matching Charon and Aeneas.
Set LEANFRAN_CLI to select the compiler executable used by host tools (default: leanfran on
PATH). Set LAKE to select the Lake executable used by the compiler (default: lake on PATH).
module generateleanfran --lang rust module generate generates Rust from a compiled Lean module. Use
--module-name <Name> and --search-path <dir> for its .olean files, or pass --batch <file>
for several jobs. --roots defaults to the module's public definitions. --import applies the
imported modules' @[csimp] lemmas. Run leanfran --lang rust module generate --help for
all options and batch keys. For several Lake packages, use leanfran generate.
0 success; 1 out-of-date output or unmet obligations (check, status); 252 invalid options;
254 invalid input (such as a missing module); 255 other errors (such as a missing tool).
The project root is the nearest directory with a leanfran.toml, or else the nearest directory
with a Cargo.toml. Use the shared settings
and the Rust table:
[check]
require = "proved"
[embed.rust]
paths = ["."]
paths selects the crate directories (default: ["."]). [[require]] adds Lake packages to
the shared workspace; Rust also adds the matching Aeneas package when it needs to translate
functions. [lake] packages-dir can share the Lake package cache. The proof gate applies to
check and status, not to cargo build.
| Variable | Effect |
|---|---|
LEANFRAN_AUTO_SYNC=1 | Let the build script sync an eligible stale block instead of stopping. |
CHARON, AENEAS | Executables used by cargo leanfran translate (default: from PATH). |
LEANFRAN_RUNS, LEANFRAN_SEED | Number of accepted inputs and seed of the random tests. |
#[leanfran::model] binds a Rust function to specs written in Lean. Charon and Aeneas
translate the function to a Lean model; leanfran states the obligations (Lean propositions)
from the specs, checks the proofs in the project root's lean/Proofs/, and records them
under rust in leanfran.lock. Cargo builds the crate without reading the lock or running
Charon; translation uses Charon's own nightly.
leanfran::lean! {
#[lean(imports = ["Aeneas"])]
pub mod bits;
r#"
open Aeneas Aeneas.Std
def max (a b : Std.U32) : Std.U32 := if a.val ≤ b.val then b else a
def max_bound (a b r : Std.U32) : Bool := decide (a.val ≤ r.val ∧ b.val ≤ r.val)
"#
}
#[leanfran::model(refines = bits::max, ensures(bound = bits::max_bound))]
pub fn max_u32(a: u32, b: u32) -> u32 {
if a <= b { b } else { a }
}
-- lean/Proofs/Bits.lean
import LeanRustGen.Obligation.my_crate
open Aeneas Aeneas.Std Result
namespace my_crate
theorem max_u32.proof.refines : max_u32.obligation.refines := by
intro a b
unfold max_u32 _root_.bits.max
by_cases h : a.val ≤ b.val <;> simp [UScalar.le_equiv, h]
To run the checked-in example, build leanfran and cargo-leanfran, put them on PATH, and
run these commands in langs/Rust/samples/verified-rust with the Rust development tools:
$ leanfran --lang rust check --require proved
[…]
verified_rust::bits::max_u32 [bound]: proved
verified_rust::bits::max_u32 [refines]: proved
[…]
$ cargo test
Specs are public functions generated from Lean (lean! or leanfran generate) and are named by
their Rust path, so rustc checks the name; Lean and the test check the
types. A string names a Lean
definition (a Prop is fine) for an obligation without a test. Specs are written in the types
of Aeneas's model: Std.U8…Std.I128, Std.Usize (Rust u8…i128, usize), Slice α and
alloc.vec.Vec α (Vec<T>), Std.Array α n ([T; N]), Str (String), core.result.Result α β (Result<T, E>), Result α (the value; a panic unless ok),
and the crate's structs and enums, which derive leanfran::Model (and Clone).
| Key | Obligation M.obligation.<label> (M: the model) |
|---|---|
refines = spec | ∀ args, M args = ok (spec args) (label refines) |
requires = pre | the assumption pre args = true → of every obligation; the tests draw inputs satisfying it |
ensures(label = post, ..) | ∀ args, M args ⦃ r => post args r = true ⦄ (post takes the arguments, the result unless (), and the values of the &mut arguments after the call); a label matches [a-z][a-z0-9_]* and is not refines or returns_nat |
check = false | no test |
strategy = path | the proptest strategy of the arguments (a value for one argument, a tuple otherwise); of a generic function, a generic function called with the types of each instance |
instances = [u32, i64] | the types a generic function is tested with (a tuple per instance for several type parameters) |
obligations = generic \| per_instance | the obligations of a generic function: one for every type (default), or one per type of instances (label <label>.<type>) |
On an impl block, #[leanfran::model] models every method; a method's own
#[leanfran::model(..)] gives its specs. #[leanfran::opaque] keeps the body of a function
out of the model, and on an inherent impl block, the bodies of its methods (a method's own
#[leanfran::opaque(..)] gives its check and strategy): its model is written in
lean/Proofs/External.lean (and the types Aeneas does not know, such as BTreeMap, in
lean/Proofs/ExternalTypes.lean), using the generated models as a reference. cargo test compares
an opaque function with its model when the model is a definition (the build script compiles it
like a lean! block): equal results, or a panic of the function where the model fails. Every loop of a modelled function has a label: 'scan: for .. in insert_sorted is
insert_sorted.scan, an alias of Aeneas's insert_sorted_loop, so proofs keep their names
when loops are added.
A generic function is tested with the types of instances, and its obligation holds for every
type. Aeneas passes each trait bound as a structure of the trait's methods (core.cmp.Ord T);
the obligation assumes that the structure obeys the laws of a Lean class, stated by
LeanRustGen/Lib/AeneasModel.lean (in the workspace):
| Bound | Assumption |
|---|---|
PartialEq, Eq | [DecidableEq T] [PartialEqModel inst]: eq decides = |
PartialOrd | [Preorder T] [DecidableRel (· ≤ ·)] [PartialOrdModel inst]: the comparisons decide ≤ |
Ord | [LinearOrder T] [OrdModel inst]: cmp is compare, max and min are max and min |
Clone | [CloneModel inst]: clone returns the value |
Copy | nothing |
Default | [Inhabited T] [DefaultModel inst]: default is default |
The classes have @[step] lemmas (ord.partialOrdInst.lt a b ⦃ r => r = decide (a < b) ⦄),
and Aeneas's instances of the scalars (all classes), bool (PartialEq, Clone), (), Vec
(PartialEq, Clone), Box and arrays (Clone) are proved to be models.
leanfran::lean! {
#[lean(imports = ["Aeneas"])]
pub mod spec;
r#"
def max_ge {α : Type} [LinearOrder α] (a b r : α) : Bool := decide (a ≤ r ∧ b ≤ r)
rust_instances max_ge [Std.U32, Std.I64]
"#
}
#[leanfran::model(instances = [u32, i64], ensures(ge = spec::max_ge))]
pub fn max_of<T: Ord + Copy>(a: T, b: T) -> T {
if a >= b { a } else { b }
}
-- the obligation
def max_of.obligation.ge : Prop :=
∀ {T : Type} [LinearOrder T] (corecmpOrdInst : core.cmp.Ord T) [LeanRust.OrdModel corecmpOrdInst]
(coremarkerCopyInst : core.marker.Copy T), ∀ a b,
max_of corecmpOrdInst coremarkerCopyInst a b ⦃ res => _root_.spec.max_ge a b res (α := T) = true ⦄
theorem max_of.proof.ge : max_of.obligation.ge := by
intro T _ ord _ copy a b
unfold max_of
step*
· simp_all [_root_.spec.max_ge]
· simp_all [_root_.spec.max_ge]
exact le_of_lt (by simpa using ‹_›)
The tests call max_of::<u32> and max_of::<i64> and the spec spec::max_ge with the same
types: the spec is a polymorphic Lean function instantiated by rust_instances for the model
types of the instances. A bound without a law class (a trait of the crate, Hash) needs
obligations = per_instance: each obligation passes Aeneas's instances of the type
(core.cmp.OrdU32, or the crate's Item.Insts.CoreCmpOrd) and the instantiation of the spec
(spec.max_ge.inst_U32). A proved refines replaces the instantiation of each type whose
obligation holds: with generic, the types whose bounds Aeneas's library models; with
per_instance, the types of the proved obligations. Methods of generic impl blocks take the
type parameters of the block first, and derive(leanfran::Model) implements Model for a
generic struct or enum when its parameters do (impl<T: Model> Model for Pair<T>); a spec
names it with its Aeneas type (generic.Pair Std.U32).
check syncs, translates marked functions, and checks block theorems and proofs in
lean/Proofs/. Write the proof of M.obligation.label as theorem M.proof.label : M.obligation.label.
The command prints <function id> [<label>]: <state> for each obligation. The id includes the crate and
module, for example verified_rust::bits::max_u32.
| State | Meaning |
|---|---|
proved | The theorem holds using only the standard axioms. |
sorry, axioms | The proof uses sorry or a non-standard axiom, respectively. |
missing, mismatch, failed | The theorem is absent, has the wrong statement, or is rejected, respectively. |
unextracted | Leanfran could not translate the function or state its obligations. |
stale, removed (status) | The recorded inputs changed, or the function is only in the lock. |
status checks the current blocks and function sources, dependencies, proof files and settings
against the manifest and lock. It does not rebuild or prove anything. In CI run
leanfran --lang rust check --require proved, then compare the cache, manifest and lock with
git diff --exit-code.
| Path | Contents |
|---|---|
.leanfran/rust/workspace/LeanRustGen/ | Generated blocks, Aeneas models and obligation statements. Do not commit. |
lean/Proofs/ | Handwritten proofs at the project root; commit. |
lean/Proofs/External.lean, lean/Proofs/ExternalTypes.lean | Handwritten models of opaque functions and types, when used; commit. |
leanfran.lock, leanfran.manifest.json, .leanfran/rust/cache/ | Proof status and generated files; commit. |
Leanfran replaces a specification only when status reports a proved refines without
requires, the generated code can call the implementation, and its values can round-trip.
The model must not use a specification that is a candidate for replacement. If several
functions qualify for one specification, the first by function id wins.
The obligation must cover all of the specification's arguments in the same order, and the model
and specification types must match after unfolding reducible definitions such as abbrev.
The sole result exception is an Int model result for a Nat specification; that proof
guarantees a nonnegative result. Arguments coerced or supplied by elaboration do not qualify.
check writes the lock and applies the replacement. The next sync drops it if the function,
its dependencies, the proofs, or other inputs changed so that status no longer reports it as
proved. Until that sync, generated calls may still reach the changed implementation.
Random tests always compare the host function against the Lean body with no replacements.
The generated Rust function for bits::max and calls to it from Lean blocks can call the
proved Rust implementation in the same crate. LeanRustCsimp supplies the @[csimp]
lemmas. The original body is available through __leanfran_spec (for example,
bits::__leanfran_spec::max). A Rust panic reaches the caller.
Propositional specs, instances of types without a Rust model, and types that cannot cross
the Lean/Rust boundary are not eligible. The --internal-only mode does not replace the
specification. Calls already inlined by Lean keep the original body; @[noinline] keeps a
callable definition.
A function is unextracted when its model would not return what the function returns in every
build of the crate:
| The function, or a function that it calls | Why |
|---|---|
drops a value of a type with a Drop of the crate | the model does not run it |
has code under cfg, or names an alias, a use or a macro under cfg | the model has the code of one build |
has a debug_assert! with a call or an assignment in its condition | a release build does not run it |
calls line!, column!, file!, env! or include! | their values do not depend on the function only |
| calls a macro of another crate, or has an attribute macro | leanfran does not see its code |
has a constant that depends on the size of usize in an array or a pattern | rustc computes it for one target (leanfran also compiles the crate for a target of 32 bits) |
uses floating-point numbers or get_unchecked | Aeneas has no model |
calls Vec::with_capacity with no sum of constants and lengths | it panics above isize::MAX bytes |
uses a Clone that is not derived with vec![x; n], resize or fill | Rust moves x to the last element |
uses a clone_from, or an ne of a PartialEq, with a Vec, an array or a Box | the models of the instances have clone and eq only |
uses a PartialEq that is not derived with contains | Rust compares the element with the argument |
uses a name of Aeneas (Result, core) that a type or a module of its module has | Lean takes the name for that of the crate |
The overflow of +, -, *, unary -, << and >> is a failure of the model, as in a build with
overflow-checks. An obligation that is proved holds without it: its function does not overflow for
the arguments that satisfy requires, so that a release build returns the same value.
Each accepted input calls the implementation once. The test checks refines first, then
ensures in the written order, and reports the first failure for that function. run is the
zero-based index of the original failure among accepted inputs; input shows the counterexample
after shrinking. If the host call fails, the value is failed: <reason>. If a specification
fails, the report says the spec failed and shows error: <reason>.
cargo test runs each test with 200 inputs of the seed 1 that satisfy requires. Without a
strategy, they are the boundaries of the types of the arguments (the minimum and the maximum, -1, 0,
1, the powers of two around which a conversion changes a value), small and equal values, empty
collections, and the values of proptest's any.
LEANFRAN_RUNS (1 to 2147483647) sets the number of inputs and LEANFRAN_SEED (0 to
9223372036854775807) the seed. A test fails when it rejects more than 100 inputs per run. A
failure prints the smallest input found and the number (from 0, of the inputs that
satisfy requires) of the first input that failed:
crate::max_u32 [refines]: mismatch (seed 1, run 0)
input: a=1, b=0
expected: 1, got: 0
For ensures, the first line is crate::max_u32 [bound]: max_bound does not hold (seed 1, run 0), with the name of the spec in its lean! block, and the last one result: 0. The value of a
function that panics is failed: panic: <message>. When the spec panics, the first line says
the spec failed and the last one error: panic: <message>. When the spec does not take the types of the
function, the test fails at its first input with that line and error: argument 1 has type u32, the spec expects Nat, and the other tests of the crate run. A label opaque is the test of a #[leanfran::opaque]
function against its model.
Tasks run synchronously where they are created.wasm32-unknown-unknown (see
WebAssembly).IO follows the C runtime: files, directories, the environment, child processes (fork and
execvp) and promises, with the same IO.Errors. Since tasks run synchronously,
IO.Process.output reads the standard output of the child before its standard error, the
result of an unresolved promise cannot be awaited, IO.getNumHeartbeats returns the value
last set, and allocprof prints no profile.uses.Pair Nat Bool → PairNatBool).#[leanfran::model] covers what Aeneas covers (no unsafe, interior mutability or
concurrency). A trait method is extracted only for a trait of the crate. An opaque method
belongs to an inherent impl block that is not generic, and no other method or function of its
module has its name (Charon finds the method by its module and name). Generic functions take
neither const generics, trait objects nor Fn bounds; Aeneas has no instances of Ord for
String, char and bool, nor of the traits of Option, Result and slices, so a generic
proof covers those types only by test.rust_instances.item in the module item): rename the parameter.Can you improve this documentation? These fine people already did:
conao3, github-actions[bot] & Naoya YamashitaEdit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |