nandi/rustnimpublic Fork 0
d4592812fae6b652d94be442f5b3a408d3ab21b6
Commits
Clone
git clone https://git.rickub.com/nandi/rustnim.git
git clone ssh://git@rickub.com/nandi/rustnim.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Add the differential test runner, and a lowering to measure with it 8ac32af · on d4592812fae6b652d94be442f5b3a408d3ab21b6 · nandithebull · 11h ago
016-signed-overflow-traps.rs · 9 lines · 311 BRust Blame HistoryRaw
1
2
3
4
5
6
7
8
9
// DESIGN.md item 3, settled: this project models rustc's *debug* profile,
// where signed overflow panics. Nim's default build traps it too, so the two
// agree — including on the exit code.
fn main() {
    let mut x: i32 = 2147483647;
    println!("{}", x);
    x += 1;
    println!("unreachable {}", x);
}