2019-12-11 08:51:28 -06:00
|
|
|
#![feature(never_type, never_type_fallback)]
|
2018-01-21 02:44:41 -06:00
|
|
|
#![feature(exhaustive_patterns)]
|
2018-11-20 16:49:48 -06:00
|
|
|
|
|
|
|
#![allow(unreachable_code)]
|
2017-01-17 07:32:27 -06:00
|
|
|
#![deny(unreachable_patterns)]
|
|
|
|
|
2018-11-20 16:49:48 -06:00
|
|
|
enum Void {}
|
|
|
|
|
|
|
|
impl Iterator for Void {
|
|
|
|
type Item = Void;
|
2017-01-17 07:32:27 -06:00
|
|
|
|
2018-11-20 16:49:48 -06:00
|
|
|
fn next(&mut self) -> Option<Void> {
|
|
|
|
None
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
for _ in unimplemented!() as Void {}
|
2017-01-17 07:32:27 -06:00
|
|
|
//~^ ERROR unreachable pattern
|
|
|
|
}
|