From fbe6d6608366974f5942c08d03cd5fe9d0eadb7c Mon Sep 17 00:00:00 2001 From: iosmanthus Date: Mon, 10 Dec 2018 10:17:19 +0800 Subject: [PATCH] add never type annotation --- e.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e.rs b/e.rs index 3a363be..e4a776f 100644 --- a/e.rs +++ b/e.rs @@ -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"); }