Panic: attempt to subtract with overflow
$ RUST_BACKTRACE=1 cargo run
Compiling proost v0.1.0 (/home/jean/repos/proost/proost)
Finished dev [unoptimized + debuginfo] target(s) in 2.11s
Running `target/debug/proost`
Welcome to proost 0.1.0
» def And: Prop -> Prop -> Prop := fun A B: Prop => (C: Prop) -> (A -> B -> C) -> C
✓
»
def and_comm: (A B: Prop) -> And A B -> And B A :=
fun A B: Prop, f: And A B, C: Prop, bac: B -> A -> C => f (fun a:A, b:B => bac b a)
thread 'main' panicked at 'attempt to subtract with overflow', proost/src/main.rs:162:90
stack backtrace:
0: rust_begin_unwind
at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/std/src/panicking.rs:575:5
1: core::panicking::panic_fmt
at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/panicking.rs:64:14
2: core::panicking::panic
at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/panicking.rs:111:5
3: proost::display
at ./proost/src/main.rs:162:90
4: proost::main::{{closure}}
at ./proost/src/main.rs:125:21
5: kernel::memory::arena::use_arena
at ./kernel/src/memory/arena.rs:74:5
6: proost::main
at ./proost/src/main.rs:113:5
7: core::ops::function::FnOnce::call_once
at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/ops/function.rs:507:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
A dbg!
call shows
[proost/src/main.rs:158] loc.start.column = 59
[proost/src/main.rs:158] loc.end.column = 1
and therefore the expression
loc.end.column - loc.start.column - 1
gets negative.