]> git.proxmox.com Git - rustc.git/blame - src/test/mir-opt/uninhabited-enum.rs
Update upstream source from tag 'upstream/1.49.0_beta.4+dfsg1'
[rustc.git] / src / test / mir-opt / uninhabited-enum.rs
CommitLineData
0731742a
XL
1#![feature(never_type)]
2
3pub enum Void {}
4
3dfed10e 5// EMIT_MIR uninhabited_enum.process_never.SimplifyLocals.after.mir
0731742a
XL
6#[no_mangle]
7pub fn process_never(input: *const !) {
8 let _input = unsafe { &*input };
9}
10
3dfed10e 11// EMIT_MIR uninhabited_enum.process_void.SimplifyLocals.after.mir
0731742a
XL
12#[no_mangle]
13pub fn process_void(input: *const Void) {
14 let _input = unsafe { &*input };
15 // In the future, this should end with `unreachable`, but we currently only do
16 // unreachability analysis for `!`.
17}
18
19fn main() {}