diff --git a/src/daemon.rs b/src/daemon.rs index 11a97ca..6433bcd 100644 --- a/src/daemon.rs +++ b/src/daemon.rs @@ -1,3 +1,5 @@ +use core::convert::Infallible; + use super::{ clone, CloneFlags, @@ -17,7 +19,7 @@ pub struct Daemon { } impl Daemon { - pub fn new !>(f: F) -> Result { + pub fn new Infallible>(f: F) -> Result { let mut pipes = [0; 2]; pipe2(&mut pipes, 0)?; @@ -29,6 +31,8 @@ impl Daemon { f(Daemon { write_pipe, }); + // TODO: Replace Infallible with the never type once it is stabilized. + unreachable!(); } else { let _ = close(write_pipe); diff --git a/src/lib.rs b/src/lib.rs index 0af87b3..548097c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,5 @@ #![feature(asm)] #![feature(llvm_asm)] -#![feature(never_type)] #![cfg_attr(not(test), no_std)] #[cfg(test)]