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);
}
|