Replace ! with Infallible for now.
This commit is contained in:
@@ -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: FnOnce(Daemon) -> !>(f: F) -> Result<!> {
|
||||
pub fn new<F: FnOnce(Daemon) -> Infallible>(f: F) -> Result<Infallible> {
|
||||
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);
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#![feature(asm)]
|
||||
#![feature(llvm_asm)]
|
||||
#![feature(never_type)]
|
||||
#![cfg_attr(not(test), no_std)]
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user