mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
21 lines
354 B
Rust
21 lines
354 B
Rust
#![feature(never_type, never_type_fallback)]
|
|
#![feature(exhaustive_patterns)]
|
|
|
|
#![allow(unreachable_code)]
|
|
#![deny(unreachable_patterns)]
|
|
|
|
enum Void {}
|
|
|
|
impl Iterator for Void {
|
|
type Item = Void;
|
|
|
|
fn next(&mut self) -> Option<Void> {
|
|
None
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
for _ in unimplemented!() as Void {}
|
|
//~^ ERROR unreachable pattern
|
|
}
|