mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
20 lines
353 B
Rust
20 lines
353 B
Rust
#![feature(exhaustive_patterns)]
|
|
#![feature(never_type, never_type_fallback)]
|
|
#![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
|
|
}
|