Update to Rust 2021.

This commit is contained in:
Dan Gohman
2021-11-04 08:01:00 -07:00
parent bbd33daaaa
commit af6fe79b1d
11 changed files with 1 additions and 16 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ description = "Safe Rust (\"rs\") bindings to POSIX-like/Unix-like/Linux (\"ix\"
documentation = "https://docs.rs/rsix"
license = "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT"
repository = "https://github.com/bytecodealliance/rsix"
edition = "2018"
edition = "2021"
keywords = ["api", "file", "network"]
categories = ["filesystem", "network-programming", "os::unix-apis"]
exclude = ["/.github"]
-2
View File
@@ -7,8 +7,6 @@ use super::offset::libc_off_t;
#[cfg(not(windows))]
use crate::ffi::ZStr;
use crate::io::{self, OwnedFd};
#[cfg(windows)]
use core::convert::TryInto;
#[cfg(not(windows))]
#[inline]
-1
View File
@@ -75,7 +75,6 @@ use crate::ffi::ZStr;
#[cfg(any(target_os = "ios", target_os = "macos"))]
use crate::ffi::ZString;
use crate::io::{self, OwnedFd, SeekFrom};
use core::convert::TryInto;
#[cfg(any(target_os = "android", target_os = "linux"))]
use core::mem::size_of;
#[cfg(target_os = "linux")]
-1
View File
@@ -62,7 +62,6 @@ use super::super::fd::{FromFd, FromRawFd, IntoFd, IntoRawFd};
use crate::io::{self, OwnedFd};
use alloc::vec::Vec;
use bitflags::bitflags;
use core::convert::TryInto;
use core::fmt;
use core::marker::PhantomData;
use core::ops::Deref;
-1
View File
@@ -29,7 +29,6 @@ use super::{MlockFlags, ReadWriteFlags};
use crate::ffi::ZStr;
use crate::io::{self, IoSlice, IoSliceMut, OwnedFd};
use core::cmp::min;
use core::convert::TryInto;
use core::mem::MaybeUninit;
#[cfg(not(any(target_os = "redox", target_env = "newlib")))]
use core::sync::atomic::{AtomicUsize, Ordering};
-2
View File
@@ -19,7 +19,6 @@ use super::{
use crate::as_ptr;
use crate::io::{self, OwnedFd};
use crate::net::{SocketAddrAny, SocketAddrV4, SocketAddrV6};
use core::convert::TryInto;
use core::mem::{size_of, MaybeUninit};
#[cfg(not(any(target_os = "redox", target_os = "wasi",)))]
use core::ptr::null_mut;
@@ -398,7 +397,6 @@ pub(crate) mod sockopt {
use crate::net::Ipv6Addr;
use crate::net::{Ipv4Addr, SocketType};
use crate::{as_mut_ptr, io};
use core::convert::TryInto;
use core::time::Duration;
#[inline]
-2
View File
@@ -31,8 +31,6 @@ use crate::process::Rlimit;
use crate::process::{Cpuid, MembarrierCommand, MembarrierQuery};
#[cfg(not(target_os = "wasi"))]
use crate::process::{Gid, Pid, Uid, WaitOptions, WaitStatus};
#[cfg(not(any(target_os = "fuchsia", target_os = "redox", target_os = "wasi")))]
use core::convert::TryInto;
use core::mem::MaybeUninit;
#[cfg(not(target_os = "wasi"))]
-1
View File
@@ -228,7 +228,6 @@ pub(super) fn dev_t<'a, Num: ArgNumber>(dev: u64) -> ArgReg<'a, Num> {
#[cfg(target_pointer_width = "32")]
#[inline]
pub(super) fn dev_t<'a, Num: ArgNumber>(dev: u64) -> io::Result<ArgReg<'a, Num>> {
use core::convert::TryInto;
dev.try_into().map(raw_arg).map_err(|_err| io::Error::INVAL)
}
-1
View File
@@ -39,7 +39,6 @@ use super::{
};
use crate::ffi::ZStr;
use crate::io::{self, OwnedFd, SeekFrom};
use core::convert::TryInto;
use core::mem::MaybeUninit;
#[cfg(target_arch = "arm")]
use linux_raw_sys::general::__NR_arm_fadvise64_64 as __NR_fadvise64_64;
-2
View File
@@ -43,7 +43,6 @@ use super::{
};
use crate::io::{self, OwnedFd};
use crate::net::{SocketAddrAny, SocketAddrUnix, SocketAddrV4, SocketAddrV6};
use core::convert::TryInto;
use core::mem::MaybeUninit;
#[cfg(not(target_arch = "x86"))]
use linux_raw_sys::general::{
@@ -828,7 +827,6 @@ pub(crate) mod sockopt {
use crate::io;
use crate::net::sockopt::Timeout;
use crate::net::{Ipv4Addr, Ipv6Addr, SocketType};
use core::convert::TryInto;
use core::time::Duration;
// TODO use Duration::ZERO when we don't need 1.51 support
-2
View File
@@ -60,8 +60,6 @@ use crate::process::{
use crate::time::NanosleepRelativeResult;
use alloc::borrow::Cow;
use alloc::vec::Vec;
#[cfg(target_pointer_width = "32")]
use core::convert::TryInto;
use core::mem::{size_of_val, MaybeUninit};
#[cfg(any(target_arch = "aarch64", target_arch = "riscv64"))]
use linux_raw_sys::general::__NR_epoll_pwait;