Properly use the never type.

This commit is contained in:
2018-11-29 17:01:01 +01:00
parent d02fd49bd6
commit b570821c8a

View File

@@ -19,12 +19,11 @@ impl common::Solution for Day25 {
let initial = 0b101010101010 - 362 * 7;
println!("Initial value: {}", initial);
sender_program(initial);
unreachable!();
}
}
/// This function is an approximation of what the original code is doing.
pub fn sender_program(mut a: i32) {
pub fn sender_program(mut a: i32) -> ! {
// Placeholder variables
let mut b;
let mut d;