This repository was archived by the owner on Nov 6, 2020. It is now read-only.

Description
.expect
and assert!
should all have strings of the form:
"<truth> ( [, <truth>] ... ) ( [; so <derivation>] ... ); qed"
e.g.
fn foo(x: Option<int>) -> int {
let mut b = false;
if x.is_some() {
b = bar();
}
if b {
return x.expect("`b` initially `false`; `b` changed only inside block guarded by `x.is_some()`; `b` is `true`; so `x` must be `Some`; qed") - 1;
}
0
}
Any other panickers (e.g. subscripting) must have an additional assert!
prepended so they fail with an error message as early as possible.