mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-02 19:39:49 +09:00
Fix redox and nightly
This commit is contained in:
4
Cargo.lock
generated
4
Cargo.lock
generated
@@ -1120,9 +1120,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.141"
|
||||
version = "0.2.151"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
|
||||
checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4"
|
||||
|
||||
[[package]]
|
||||
name = "libffi"
|
||||
|
||||
@@ -56,7 +56,7 @@ indexmap = { version = "1.9.3", features = ["std"] }
|
||||
insta = "1.33.0"
|
||||
itertools = "0.11.0"
|
||||
is-macro = "0.3.0"
|
||||
libc = "0.2.133"
|
||||
libc = "0.2.151"
|
||||
log = "0.4.16"
|
||||
nix = "0.26"
|
||||
malachite-bigint = "0.2.0"
|
||||
|
||||
@@ -230,10 +230,10 @@ mod stack {
|
||||
res.unwrap_or_else(|x| panic::resume_unwind(x))
|
||||
}
|
||||
|
||||
pub fn iter(&self) -> impl Iterator<Item = &T> + DoubleEndedIterator + '_ {
|
||||
pub fn iter(&self) -> impl DoubleEndedIterator<Item = &T> + '_ {
|
||||
self.as_ref().iter().copied()
|
||||
}
|
||||
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut T> + DoubleEndedIterator + '_ {
|
||||
pub fn iter_mut(&mut self) -> impl DoubleEndedIterator<Item = &mut T> + '_ {
|
||||
self.as_mut().iter_mut().map(|x| &mut **x)
|
||||
}
|
||||
// pub fn top(&self) -> Option<&T> {
|
||||
|
||||
@@ -11,10 +11,10 @@ mod resource {
|
||||
use std::{io, mem};
|
||||
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(any(target_os = "linux", target_os = "android"))] {
|
||||
if #[cfg(target_os = "android")] {
|
||||
use libc::RLIM_NLIMITS;
|
||||
} else {
|
||||
// in bsd-ish platforms, this constant isn't abi-stable across os versions, so we just
|
||||
// This constant isn't abi-stable across os versions, so we just
|
||||
// pick a high number so we don't get false positive ValueErrors and just bubble up the
|
||||
// EINVAL that get/setrlimit return on an invalid resource
|
||||
const RLIM_NLIMITS: i32 = 256;
|
||||
|
||||
@@ -54,19 +54,19 @@ mod _socket {
|
||||
// put IPPROTO_MAX later
|
||||
use c::{
|
||||
AF_INET, AF_INET6, AF_UNSPEC, INADDR_ANY, INADDR_LOOPBACK, INADDR_NONE, IPPROTO_ICMP,
|
||||
IPPROTO_ICMPV6, IPPROTO_IP, IPPROTO_IPIP, IPPROTO_IPV6, IPPROTO_TCP,
|
||||
IPPROTO_TCP as SOL_TCP, IPPROTO_UDP, MSG_CTRUNC, MSG_DONTROUTE, MSG_OOB, MSG_PEEK,
|
||||
MSG_TRUNC, MSG_WAITALL, NI_DGRAM, NI_MAXHOST, NI_NAMEREQD, NI_NOFQDN, NI_NUMERICHOST,
|
||||
NI_NUMERICSERV, SHUT_RD, SHUT_RDWR, SHUT_WR, SOCK_DGRAM, SOCK_STREAM, SOL_SOCKET,
|
||||
SO_BROADCAST, SO_ERROR, SO_LINGER, SO_OOBINLINE, SO_REUSEADDR, SO_TYPE, TCP_NODELAY,
|
||||
IPPROTO_ICMPV6, IPPROTO_IP, IPPROTO_IPV6, IPPROTO_TCP, IPPROTO_TCP as SOL_TCP, IPPROTO_UDP,
|
||||
MSG_CTRUNC, MSG_DONTROUTE, MSG_OOB, MSG_PEEK, MSG_TRUNC, MSG_WAITALL, NI_DGRAM, NI_MAXHOST,
|
||||
NI_NAMEREQD, NI_NOFQDN, NI_NUMERICHOST, NI_NUMERICSERV, SHUT_RD, SHUT_RDWR, SHUT_WR,
|
||||
SOCK_DGRAM, SOCK_STREAM, SOL_SOCKET, SO_BROADCAST, SO_ERROR, SO_LINGER, SO_OOBINLINE,
|
||||
SO_REUSEADDR, SO_TYPE, TCP_NODELAY,
|
||||
};
|
||||
|
||||
#[cfg(not(target_os = "redox"))]
|
||||
#[pyattr]
|
||||
use c::{
|
||||
AF_DECnet, AF_APPLETALK, AF_IPX, IPPROTO_AH, IPPROTO_DSTOPTS, IPPROTO_EGP, IPPROTO_ESP,
|
||||
IPPROTO_FRAGMENT, IPPROTO_HOPOPTS, IPPROTO_IDP, IPPROTO_IGMP, IPPROTO_NONE, IPPROTO_PIM,
|
||||
IPPROTO_PUP, IPPROTO_RAW, IPPROTO_ROUTING,
|
||||
IPPROTO_FRAGMENT, IPPROTO_HOPOPTS, IPPROTO_IDP, IPPROTO_IGMP, IPPROTO_IPIP, IPPROTO_NONE,
|
||||
IPPROTO_PIM, IPPROTO_PUP, IPPROTO_RAW, IPPROTO_ROUTING,
|
||||
};
|
||||
|
||||
#[cfg(unix)]
|
||||
|
||||
@@ -299,7 +299,7 @@ impl PyType {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn iter_mro(&self) -> impl Iterator<Item = &PyType> + DoubleEndedIterator {
|
||||
pub fn iter_mro(&self) -> impl DoubleEndedIterator<Item = &PyType> {
|
||||
std::iter::once(self).chain(self.mro.iter().map(|cls| -> &PyType { cls }))
|
||||
}
|
||||
|
||||
@@ -420,7 +420,7 @@ impl Py<PyType> {
|
||||
self.as_object().is(cls.borrow()) || self.mro.iter().any(|c| c.is(cls.borrow()))
|
||||
}
|
||||
|
||||
pub fn iter_mro(&self) -> impl Iterator<Item = &Py<PyType>> + DoubleEndedIterator {
|
||||
pub fn iter_mro(&self) -> impl DoubleEndedIterator<Item = &Py<PyType>> {
|
||||
std::iter::once(self).chain(self.mro.iter().map(|x| x.deref()))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user