2023-10-16 17:36:39 +00:00
|
|
|
// skip-filecheck
|
2019-12-11 14:51:28 +00:00
|
|
|
#![feature(never_type)]
|
|
|
|
|
2018-12-11 12:18:51 +00:00
|
|
|
pub enum Void {}
|
|
|
|
|
2022-12-04 19:20:55 +00:00
|
|
|
// EMIT_MIR uninhabited_enum.process_never.SimplifyLocals-final.after.mir
|
2018-12-11 12:18:51 +00:00
|
|
|
#[no_mangle]
|
|
|
|
pub fn process_never(input: *const !) {
|
2024-06-03 00:18:33 +00:00
|
|
|
let _input = unsafe { &*input };
|
2018-12-11 12:18:51 +00:00
|
|
|
}
|
|
|
|
|
2022-12-04 19:20:55 +00:00
|
|
|
// EMIT_MIR uninhabited_enum.process_void.SimplifyLocals-final.after.mir
|
2018-12-11 12:18:51 +00:00
|
|
|
#[no_mangle]
|
|
|
|
pub fn process_void(input: *const Void) {
|
2024-06-03 00:18:33 +00:00
|
|
|
let _input = unsafe { &*input };
|
|
|
|
// In the future, this should end with `unreachable`, but we currently only do
|
|
|
|
// unreachability analysis for `!`.
|
2018-12-11 12:18:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|