File: simple.rs

package info (click to toggle)
rust-new-debug-unreachable 1.0.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 104 kB
  • sloc: makefile: 4
file content (10 lines) | stat: -rw-r--r-- 195 bytes parent folder | download | duplicates (51)
1
2
3
4
5
6
7
8
9
10
use debug_unreachable::debug_unreachable;

fn main() {
    if 0 > 100 {
        // Can't happen!
        unsafe { debug_unreachable!() }
    } else {
        println!("Good, 0 <= 100.");
    }
}