2019-12-11 09:51:28 -05:00
|
|
|
#![feature(never_type)]
|
|
|
|
|
2018-12-11 12:18:51 +00:00
|
|
|
pub enum Void {}
|
|
|
|
|
2020-07-27 21:22:43 +02:00
|
|
|
// EMIT_MIR uninhabited_enum.process_never.SimplifyLocals.after.mir
|
2018-12-11 12:18:51 +00:00
|
|
|
#[no_mangle]
|
|
|
|
pub fn process_never(input: *const !) {
|
|
|
|
let _input = unsafe { &*input };
|
|
|
|
}
|
|
|
|
|
2020-07-27 21:22:43 +02:00
|
|
|
// EMIT_MIR uninhabited_enum.process_void.SimplifyLocals.after.mir
|
2018-12-11 12:18:51 +00:00
|
|
|
#[no_mangle]
|
|
|
|
pub fn process_void(input: *const Void) {
|
|
|
|
let _input = unsafe { &*input };
|
|
|
|
// In the future, this should end with `unreachable`, but we currently only do
|
|
|
|
// unreachability analysis for `!`.
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|