Replace ! with Infallible for now.

This commit is contained in:
4lDO2
2022-03-12 10:36:07 +01:00
parent 87ffd8b862
commit efb5b3ee5b
2 changed files with 5 additions and 2 deletions

View File

@@ -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);

View File

@@ -1,6 +1,5 @@
#![feature(asm)]
#![feature(llvm_asm)]
#![feature(never_type)]
#![cfg_attr(not(test), no_std)]
#[cfg(test)]