mirror of
https://github.com/rust-lang/rust
synced 2024-09-06 01:11:17 +00:00
22 lines
283 B
Rust
22 lines
283 B
Rust
//@ check-fail
|
|
//@ known-bug: #104034
|
|
|
|
#![feature(exhaustive_patterns, never_type)]
|
|
|
|
mod inner {
|
|
pub struct Wrapper<T>(T);
|
|
}
|
|
|
|
enum Either<A, B> {
|
|
A(A),
|
|
B(inner::Wrapper<B>),
|
|
}
|
|
|
|
fn foo() -> Either<(), !> {
|
|
Either::A(())
|
|
}
|
|
|
|
fn main() {
|
|
let Either::A(()) = foo();
|
|
}
|