2020-03-05 20:53:26 -06:00
|
|
|
// build-pass
|
|
|
|
//
|
|
|
|
// (this is deliberately *not* check-pass; I have confirmed that the bug in
|
|
|
|
// question does not replicate when one uses `cargo check` alone.)
|
|
|
|
|
|
|
|
pub enum Void {}
|
|
|
|
|
2020-03-06 05:43:11 -06:00
|
|
|
enum UninhabitedUnivariant {
|
|
|
|
_Variant(Void),
|
|
|
|
}
|
|
|
|
|
|
|
|
enum UninhabitedMultivariant2 {
|
|
|
|
_Variant(Void),
|
|
|
|
_Warriont(Void),
|
|
|
|
}
|
|
|
|
|
|
|
|
enum UninhabitedMultivariant3 {
|
|
|
|
_Variant(Void),
|
|
|
|
_Warriont(Void),
|
|
|
|
_Worrynot(Void),
|
|
|
|
}
|
2020-03-05 20:53:26 -06:00
|
|
|
|
|
|
|
#[repr(C)]
|
2020-03-06 05:43:11 -06:00
|
|
|
enum UninhabitedUnivariantC {
|
|
|
|
_Variant(Void),
|
|
|
|
}
|
2020-03-05 20:53:26 -06:00
|
|
|
|
|
|
|
#[repr(i32)]
|
2020-03-06 05:43:11 -06:00
|
|
|
enum UninhabitedUnivariant32 {
|
|
|
|
_Variant(Void),
|
|
|
|
}
|
2020-03-05 20:53:26 -06:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let _seed: UninhabitedUnivariant = None.unwrap();
|
|
|
|
match _seed {
|
|
|
|
UninhabitedUnivariant::_Variant(_x) => {}
|
|
|
|
}
|
|
|
|
|
2020-03-06 05:43:11 -06:00
|
|
|
let _seed: UninhabitedMultivariant2 = None.unwrap();
|
|
|
|
match _seed {
|
|
|
|
UninhabitedMultivariant2::_Variant(_x) => {}
|
|
|
|
UninhabitedMultivariant2::_Warriont(_x) => {}
|
|
|
|
}
|
|
|
|
|
|
|
|
let _seed: UninhabitedMultivariant2 = None.unwrap();
|
|
|
|
match _seed {
|
|
|
|
UninhabitedMultivariant2::_Variant(_x) => {}
|
|
|
|
_ => {}
|
|
|
|
}
|
|
|
|
|
|
|
|
let _seed: UninhabitedMultivariant2 = None.unwrap();
|
|
|
|
match _seed {
|
|
|
|
UninhabitedMultivariant2::_Warriont(_x) => {}
|
|
|
|
_ => {}
|
|
|
|
}
|
|
|
|
|
|
|
|
let _seed: UninhabitedMultivariant3 = None.unwrap();
|
|
|
|
match _seed {
|
|
|
|
UninhabitedMultivariant3::_Variant(_x) => {}
|
|
|
|
UninhabitedMultivariant3::_Warriont(_x) => {}
|
|
|
|
UninhabitedMultivariant3::_Worrynot(_x) => {}
|
|
|
|
}
|
|
|
|
|
|
|
|
let _seed: UninhabitedMultivariant3 = None.unwrap();
|
|
|
|
match _seed {
|
|
|
|
UninhabitedMultivariant3::_Variant(_x) => {}
|
|
|
|
_ => {}
|
|
|
|
}
|
|
|
|
|
|
|
|
let _seed: UninhabitedMultivariant3 = None.unwrap();
|
|
|
|
match _seed {
|
|
|
|
UninhabitedMultivariant3::_Warriont(_x) => {}
|
|
|
|
_ => {}
|
|
|
|
}
|
|
|
|
|
|
|
|
let _seed: UninhabitedMultivariant3 = None.unwrap();
|
|
|
|
match _seed {
|
|
|
|
UninhabitedMultivariant3::_Worrynot(_x) => {}
|
|
|
|
_ => {}
|
|
|
|
}
|
|
|
|
|
2020-03-05 20:53:26 -06:00
|
|
|
let _seed: UninhabitedUnivariantC = None.unwrap();
|
|
|
|
match _seed {
|
|
|
|
UninhabitedUnivariantC::_Variant(_x) => {}
|
|
|
|
}
|
|
|
|
|
|
|
|
let _seed: UninhabitedUnivariant32 = None.unwrap();
|
|
|
|
match _seed {
|
|
|
|
UninhabitedUnivariant32::_Variant(_x) => {}
|
|
|
|
}
|
|
|
|
}
|