add never type annotation

This commit is contained in:
iosmanthus 2018-12-10 10:17:19 +08:00
parent 6932e61bc2
commit fbe6d66083

4
e.rs
View File

@ -1,10 +1,10 @@
#[cfg(feature = "functional")]
fn e() {
fn e() -> ! {
std::iter::repeat('e').for_each(|e| print!("{}", e))
}
#[cfg(not(feature = "functional"))]
fn e() {
fn e() -> ! {
loop {
print!("e");
}