use crate::sys::hermit::abi::{O_APPEND, O_CREAT, O_EXCL, O_RDONLY, O_RDWR, O_TRUNC, O_WRONLY};
use crate::sys::hermit::fd::FileDesc;
use crate::sys::time::SystemTime;
-use crate::sys::{unsupported, Void};
+use crate::sys::unsupported;
use crate::sys_common::os_str_bytes::OsStrExt;
pub use crate::sys_common::fs::copy;
#[derive(Debug)]
pub struct File(FileDesc);
-pub struct FileAttr(Void);
+pub struct FileAttr(!);
-pub struct ReadDir(Void);
+pub struct ReadDir(!);
-pub struct DirEntry(Void);
+pub struct DirEntry(!);
#[derive(Clone, Debug)]
pub struct OpenOptions {
mode: i32,
}
-pub struct FilePermissions(Void);
+pub struct FilePermissions(!);
-pub struct FileType(Void);
+pub struct FileType(!);
#[derive(Debug)]
pub struct DirBuilder {}
)
}
-// This enum is used as the storage for a bunch of types which can't actually
-// exist.
-#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)]
-pub enum Void {}
-
pub unsafe fn strlen(start: *const c_char) -> usize {
let mut str = start;
use crate::sync::Arc;
use crate::sys::hermit::abi;
use crate::sys::hermit::abi::IpAddress::{Ipv4, Ipv6};
-use crate::sys::{unsupported, Void};
+use crate::sys::unsupported;
use crate::sys_common::AsInner;
use crate::time::Duration;
}
}
-pub struct LookupHost(Void);
+pub struct LookupHost(!);
impl LookupHost {
pub fn port(&self) -> u16 {
use crate::str;
use crate::sync::Mutex;
use crate::sys::hermit::abi;
-use crate::sys::{unsupported, Void};
+use crate::sys::unsupported;
use crate::sys_common::os_str_bytes::*;
use crate::vec;
unsupported()
}
-pub struct SplitPaths<'a>(&'a Void);
+pub struct SplitPaths<'a>(&'a !);
pub fn split_paths(_unparsed: &OsStr) -> SplitPaths<'_> {
panic!("unsupported")
}
}
-// This enum is used as the storage for a bunch of types which can't actually
-// exist.
-#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)]
-pub enum Void {}
-
pub unsafe fn strlen(mut s: *const c_char) -> usize {
let mut n = 0;
while unsafe { *s } != 0 {
use crate::net::{Ipv4Addr, Ipv6Addr, Shutdown, SocketAddr, ToSocketAddrs};
use crate::sync::Arc;
use crate::sys::fd::FileDesc;
-use crate::sys::{sgx_ineffective, unsupported, AsInner, FromInner, IntoInner, TryIntoInner, Void};
+use crate::sys::{sgx_ineffective, unsupported, AsInner, FromInner, IntoInner, TryIntoInner};
use crate::time::Duration;
use super::abi::usercalls;
}
}
-pub struct UdpSocket(Void);
+pub struct UdpSocket(!);
impl UdpSocket {
pub fn bind(_: io::Result<&SocketAddr>) -> io::Result<UdpSocket> {
}
}
-pub struct LookupHost(Void);
+pub struct LookupHost(!);
impl LookupHost {
fn new(host: String) -> io::Result<LookupHost> {
use crate::sync::atomic::{AtomicUsize, Ordering};
use crate::sync::Mutex;
use crate::sync::Once;
-use crate::sys::{decode_error_kind, sgx_ineffective, unsupported, Void};
+use crate::sys::{decode_error_kind, sgx_ineffective, unsupported};
use crate::vec;
pub fn errno() -> i32 {
sgx_ineffective(())
}
-pub struct SplitPaths<'a>(&'a Void);
+pub struct SplitPaths<'a>(&'a !);
pub fn split_paths(_unparsed: &OsStr) -> SplitPaths<'_> {
panic!("unsupported")
(1, 2)
}
-// This enum is used as the storage for a bunch of types which can't actually
-// exist.
-#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)]
-pub enum Void {}
-
pub unsafe fn strlen(mut s: *const c_char) -> usize {
// SAFETY: The caller must guarantee `s` points to a valid 0-terminated string.
unsafe {
use crate::io::{self, IoSlice, IoSliceMut, SeekFrom};
use crate::path::{Path, PathBuf};
use crate::sys::time::SystemTime;
-use crate::sys::{unsupported, Void};
+use crate::sys::unsupported;
-pub struct File(Void);
+pub struct File(!);
-pub struct FileAttr(Void);
+pub struct FileAttr(!);
-pub struct ReadDir(Void);
+pub struct ReadDir(!);
-pub struct DirEntry(Void);
+pub struct DirEntry(!);
#[derive(Clone, Debug)]
pub struct OpenOptions {}
-pub struct FilePermissions(Void);
+pub struct FilePermissions(!);
-pub struct FileType(Void);
+pub struct FileType(!);
#[derive(Debug)]
pub struct DirBuilder {}
use crate::fmt;
use crate::io::{self, IoSlice, IoSliceMut};
use crate::net::{Ipv4Addr, Ipv6Addr, Shutdown, SocketAddr};
-use crate::sys::{unsupported, Void};
+use crate::sys::unsupported;
use crate::time::Duration;
-pub struct TcpStream(Void);
+pub struct TcpStream(!);
impl TcpStream {
pub fn connect(_: io::Result<&SocketAddr>) -> io::Result<TcpStream> {
}
}
-pub struct TcpListener(Void);
+pub struct TcpListener(!);
impl TcpListener {
pub fn bind(_: io::Result<&SocketAddr>) -> io::Result<TcpListener> {
}
}
-pub struct UdpSocket(Void);
+pub struct UdpSocket(!);
impl UdpSocket {
pub fn bind(_: io::Result<&SocketAddr>) -> io::Result<UdpSocket> {
}
}
-pub struct LookupHost(Void);
+pub struct LookupHost(!);
impl LookupHost {
pub fn port(&self) -> u16 {
-use super::{unsupported, Void};
+use super::unsupported;
use crate::error::Error as StdError;
use crate::ffi::{OsStr, OsString};
use crate::fmt;
unsupported()
}
-pub struct SplitPaths<'a>(&'a Void);
+pub struct SplitPaths<'a>(&'a !);
pub fn split_paths(_unparsed: &OsStr) -> SplitPaths<'_> {
panic!("unsupported")
unsupported()
}
-pub struct Env(Void);
+pub struct Env(!);
impl Iterator for Env {
type Item = (OsString, OsString);
use crate::io::{self, IoSlice, IoSliceMut};
-use crate::sys::Void;
-pub struct AnonPipe(Void);
+pub struct AnonPipe(!);
impl AnonPipe {
pub fn read(&self, _buf: &mut [u8]) -> io::Result<usize> {
use crate::path::Path;
use crate::sys::fs::File;
use crate::sys::pipe::AnonPipe;
-use crate::sys::{unsupported, Void};
+use crate::sys::unsupported;
use crate::sys_common::process::{CommandEnv, CommandEnvs};
pub use crate::ffi::OsString as EnvKey;
}
}
-pub struct ExitStatus(Void);
+pub struct ExitStatus(!);
impl ExitStatus {
pub fn success(&self) -> bool {
}
}
-pub struct Process(Void);
+pub struct Process(!);
impl Process {
pub fn id(&self) -> u32 {
-use super::{unsupported, Void};
+use super::unsupported;
use crate::ffi::CStr;
use crate::io;
use crate::time::Duration;
-pub struct Thread(Void);
+pub struct Thread(!);
pub const DEFAULT_MIN_STACK_SIZE: usize = 4096;
use crate::fmt;
use crate::io::{self, IoSlice, IoSliceMut};
use crate::net::{Ipv4Addr, Ipv6Addr, Shutdown, SocketAddr};
-use crate::sys::{unsupported, Void};
+use crate::sys::unsupported;
use crate::sys_common::FromInner;
use crate::time::Duration;
}
}
-pub struct LookupHost(Void);
+pub struct LookupHost(!);
impl LookupHost {
pub fn port(&self) -> u16 {
use crate::path::{self, PathBuf};
use crate::str;
use crate::sys::memchr;
-use crate::sys::{unsupported, Void};
+use crate::sys::unsupported;
use crate::vec;
// Add a few symbols not in upstream `libc` just yet.
}
}
-pub struct SplitPaths<'a>(&'a Void);
+pub struct SplitPaths<'a>(&'a !);
pub fn split_paths(_unparsed: &OsStr) -> SplitPaths<'_> {
panic!("unsupported")
use crate::ffi::CStr;
use crate::io;
use crate::mem;
-use crate::sys::{unsupported, Void};
+use crate::sys::unsupported;
use crate::time::Duration;
-pub struct Thread(Void);
+pub struct Thread(!);
pub const DEFAULT_MIN_STACK_SIZE: usize = 4096;
use crate::ffi::CStr;
use crate::io;
-use crate::sys::{unsupported, Void};
+use crate::sys::unsupported;
use crate::time::Duration;
-pub struct Thread(Void);
+pub struct Thread(!);
pub const DEFAULT_MIN_STACK_SIZE: usize = 4096;