Auto merge of #43246 - frewsxcv:rollup, r=frewsxcv
Rollup of 8 pull requests - Successful merges: #43074, #43145, #43159, #43202, #43222, #43228, #43229, #43240 - Failed merges:
This commit is contained in:
commit
a783fe2f77
12 changed files with 89 additions and 21 deletions
|
@ -28,6 +28,7 @@
|
||||||
|
|
||||||
use std::collections::{BTreeMap, HashSet, HashMap};
|
use std::collections::{BTreeMap, HashSet, HashMap};
|
||||||
use std::mem;
|
use std::mem;
|
||||||
|
use std::path::PathBuf;
|
||||||
use std::process;
|
use std::process;
|
||||||
|
|
||||||
use check::{self, TestKind};
|
use check::{self, TestKind};
|
||||||
|
@ -1209,11 +1210,19 @@ invalid rule dependency graph detected, was a rule added and maybe typo'd?
|
||||||
if paths.len() == 0 && rule.default {
|
if paths.len() == 0 && rule.default {
|
||||||
Some((rule, 0))
|
Some((rule, 0))
|
||||||
} else {
|
} else {
|
||||||
paths.iter().position(|path| path.ends_with(rule.path))
|
paths.iter()
|
||||||
|
.position(|path| path.ends_with(rule.path))
|
||||||
.map(|priority| (rule, priority))
|
.map(|priority| (rule, priority))
|
||||||
}
|
}
|
||||||
}).collect();
|
}).collect();
|
||||||
|
|
||||||
|
if rules.is_empty() &&
|
||||||
|
!paths.get(0).unwrap_or(&PathBuf::new())
|
||||||
|
.ends_with("nonexistent/path/to/trigger/cargo/metadata") {
|
||||||
|
println!("\nNothing to run...\n");
|
||||||
|
process::exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
rules.sort_by_key(|&(_, priority)| priority);
|
rules.sort_by_key(|&(_, priority)| priority);
|
||||||
|
|
||||||
rules.into_iter().flat_map(|(rule, _)| {
|
rules.into_iter().flat_map(|(rule, _)| {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 325c3da0814f44916bef00ff225f934f2d613203
|
Subproject commit 4ee596df22f8ecaa9a0b2ddc0624b0104540dbf7
|
|
@ -1 +1 @@
|
||||||
Subproject commit eee5ffb12773469bc02895d6b5e7e663b3a572a2
|
Subproject commit 81134a4dff811403b3b2f349b0c59a819f0fe0c1
|
|
@ -1 +1 @@
|
||||||
Subproject commit 876582e9d0fbdc9cecb03133c28db96e9ff8c844
|
Subproject commit 1abfbaa70313fdf527cf799ffd9b9a096a62105c
|
|
@ -359,11 +359,19 @@ impl<I> Iterator for Rev<I> where I: DoubleEndedIterator {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn size_hint(&self) -> (usize, Option<usize>) { self.iter.size_hint() }
|
fn size_hint(&self) -> (usize, Option<usize>) { self.iter.size_hint() }
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
|
fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
|
||||||
where P: FnMut(&Self::Item) -> bool
|
where P: FnMut(&Self::Item) -> bool
|
||||||
{
|
{
|
||||||
self.iter.rfind(predicate)
|
self.iter.rfind(predicate)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn rposition<P>(&mut self, predicate: P) -> Option<usize> where
|
||||||
|
P: FnMut(Self::Item) -> bool
|
||||||
|
{
|
||||||
|
self.iter.position(predicate)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
|
|
@ -160,7 +160,10 @@ unsafe fn swap_nonoverlapping_bytes(x: *mut u8, y: *mut u8, len: usize) {
|
||||||
// #[repr(simd)], even if we don't actually use this struct directly.
|
// #[repr(simd)], even if we don't actually use this struct directly.
|
||||||
//
|
//
|
||||||
// FIXME repr(simd) broken on emscripten and redox
|
// FIXME repr(simd) broken on emscripten and redox
|
||||||
#[cfg_attr(not(any(target_os = "emscripten", target_os = "redox")), repr(simd))]
|
// It's also broken on big-endian powerpc64 and s390x. #42778
|
||||||
|
#[cfg_attr(not(any(target_os = "emscripten", target_os = "redox",
|
||||||
|
target_endian = "big")),
|
||||||
|
repr(simd))]
|
||||||
struct Block(u64, u64, u64, u64);
|
struct Block(u64, u64, u64, u64);
|
||||||
struct UnalignedBlock(u64, u64, u64, u64);
|
struct UnalignedBlock(u64, u64, u64, u64);
|
||||||
|
|
||||||
|
|
|
@ -710,6 +710,37 @@ impl<'a> Iterator for Bytes<'a> {
|
||||||
fn nth(&mut self, n: usize) -> Option<Self::Item> {
|
fn nth(&mut self, n: usize) -> Option<Self::Item> {
|
||||||
self.0.nth(n)
|
self.0.nth(n)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn all<F>(&mut self, f: F) -> bool where F: FnMut(Self::Item) -> bool {
|
||||||
|
self.0.all(f)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn any<F>(&mut self, f: F) -> bool where F: FnMut(Self::Item) -> bool {
|
||||||
|
self.0.any(f)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn find<P>(&mut self, predicate: P) -> Option<Self::Item> where
|
||||||
|
P: FnMut(&Self::Item) -> bool
|
||||||
|
{
|
||||||
|
self.0.find(predicate)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn position<P>(&mut self, predicate: P) -> Option<usize> where
|
||||||
|
P: FnMut(Self::Item) -> bool
|
||||||
|
{
|
||||||
|
self.0.position(predicate)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn rposition<P>(&mut self, predicate: P) -> Option<usize> where
|
||||||
|
P: FnMut(Self::Item) -> bool
|
||||||
|
{
|
||||||
|
self.0.rposition(predicate)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
@ -718,6 +749,13 @@ impl<'a> DoubleEndedIterator for Bytes<'a> {
|
||||||
fn next_back(&mut self) -> Option<u8> {
|
fn next_back(&mut self) -> Option<u8> {
|
||||||
self.0.next_back()
|
self.0.next_back()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn rfind<P>(&mut self, predicate: P) -> Option<Self::Item> where
|
||||||
|
P: FnMut(&Self::Item) -> bool
|
||||||
|
{
|
||||||
|
self.0.rfind(predicate)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
|
|
@ -135,12 +135,12 @@ use sys::path::{is_sep_byte, is_verbatim_sep, MAIN_SEP_STR, parse_prefix};
|
||||||
/// get_path_prefix(r"\\?\pictures\kittens"));
|
/// get_path_prefix(r"\\?\pictures\kittens"));
|
||||||
/// assert_eq!(VerbatimUNC(OsStr::new("server"), OsStr::new("share")),
|
/// assert_eq!(VerbatimUNC(OsStr::new("server"), OsStr::new("share")),
|
||||||
/// get_path_prefix(r"\\?\UNC\server\share"));
|
/// get_path_prefix(r"\\?\UNC\server\share"));
|
||||||
/// assert_eq!(VerbatimDisk('C' as u8), get_path_prefix(r"\\?\c:\"));
|
/// assert_eq!(VerbatimDisk(b'C'), get_path_prefix(r"\\?\c:\"));
|
||||||
/// assert_eq!(DeviceNS(OsStr::new("BrainInterface")),
|
/// assert_eq!(DeviceNS(OsStr::new("BrainInterface")),
|
||||||
/// get_path_prefix(r"\\.\BrainInterface"));
|
/// get_path_prefix(r"\\.\BrainInterface"));
|
||||||
/// assert_eq!(UNC(OsStr::new("server"), OsStr::new("share")),
|
/// assert_eq!(UNC(OsStr::new("server"), OsStr::new("share")),
|
||||||
/// get_path_prefix(r"\\server\share"));
|
/// get_path_prefix(r"\\server\share"));
|
||||||
/// assert_eq!(Disk('C' as u8), get_path_prefix(r"C:\Users\Rust\Pictures\Ferris"));
|
/// assert_eq!(Disk(b'C'), get_path_prefix(r"C:\Users\Rust\Pictures\Ferris"));
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
#[derive(Copy, Clone, Debug, Hash, PartialOrd, Ord, PartialEq, Eq)]
|
#[derive(Copy, Clone, Debug, Hash, PartialOrd, Ord, PartialEq, Eq)]
|
||||||
|
@ -235,10 +235,10 @@ impl<'a> Prefix<'a> {
|
||||||
///
|
///
|
||||||
/// assert!(Verbatim(OsStr::new("pictures")).is_verbatim());
|
/// assert!(Verbatim(OsStr::new("pictures")).is_verbatim());
|
||||||
/// assert!(VerbatimUNC(OsStr::new("server"), OsStr::new("share")).is_verbatim());
|
/// assert!(VerbatimUNC(OsStr::new("server"), OsStr::new("share")).is_verbatim());
|
||||||
/// assert!(VerbatimDisk('C' as u8).is_verbatim());
|
/// assert!(VerbatimDisk(b'C').is_verbatim());
|
||||||
/// assert!(!DeviceNS(OsStr::new("BrainInterface")).is_verbatim());
|
/// assert!(!DeviceNS(OsStr::new("BrainInterface")).is_verbatim());
|
||||||
/// assert!(!UNC(OsStr::new("server"), OsStr::new("share")).is_verbatim());
|
/// assert!(!UNC(OsStr::new("server"), OsStr::new("share")).is_verbatim());
|
||||||
/// assert!(!Disk('C' as u8).is_verbatim());
|
/// assert!(!Disk(b'C').is_verbatim());
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
@ -401,7 +401,7 @@ enum State {
|
||||||
/// let path = Path::new(r"c:\you\later\");
|
/// let path = Path::new(r"c:\you\later\");
|
||||||
/// match path.components().next().unwrap() {
|
/// match path.components().next().unwrap() {
|
||||||
/// Component::Prefix(prefix_component) => {
|
/// Component::Prefix(prefix_component) => {
|
||||||
/// assert_eq!(Prefix::Disk('C' as u8), prefix_component.kind());
|
/// assert_eq!(Prefix::Disk(b'C'), prefix_component.kind());
|
||||||
/// assert_eq!(OsStr::new("c:"), prefix_component.as_os_str());
|
/// assert_eq!(OsStr::new("c:"), prefix_component.as_os_str());
|
||||||
/// }
|
/// }
|
||||||
/// _ => unreachable!(),
|
/// _ => unreachable!(),
|
||||||
|
@ -1040,7 +1040,7 @@ impl<'a> cmp::Ord for Components<'a> {
|
||||||
/// [`Deref`]: ../ops/trait.Deref.html
|
/// [`Deref`]: ../ops/trait.Deref.html
|
||||||
///
|
///
|
||||||
/// More details about the overall approach can be found in
|
/// More details about the overall approach can be found in
|
||||||
/// the module documentation.
|
/// the [module documentation](index.html).
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
|
@ -1186,7 +1186,7 @@ impl PathBuf {
|
||||||
self.inner.push(path);
|
self.inner.push(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Truncate `self` to [`self.parent`].
|
/// Truncates `self` to [`self.parent`].
|
||||||
///
|
///
|
||||||
/// Returns `false` and does nothing if [`self.file_name`] is [`None`].
|
/// Returns `false` and does nothing if [`self.file_name`] is [`None`].
|
||||||
/// Otherwise, returns `true`.
|
/// Otherwise, returns `true`.
|
||||||
|
@ -1512,7 +1512,7 @@ impl AsRef<OsStr> for PathBuf {
|
||||||
/// [`PathBuf`]: struct.PathBuf.html
|
/// [`PathBuf`]: struct.PathBuf.html
|
||||||
///
|
///
|
||||||
/// More details about the overall approach can be found in
|
/// More details about the overall approach can be found in
|
||||||
/// the module documentation.
|
/// the [module documentation](index.html).
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
|
@ -1689,7 +1689,7 @@ impl Path {
|
||||||
self.has_root() && (cfg!(unix) || cfg!(target_os = "redox") || self.prefix().is_some())
|
self.has_root() && (cfg!(unix) || cfg!(target_os = "redox") || self.prefix().is_some())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Return `false` if the `Path` is relative, i.e. not absolute.
|
/// Returns `true` if the `Path` is relative, i.e. not absolute.
|
||||||
///
|
///
|
||||||
/// See [`is_absolute`]'s documentation for more details.
|
/// See [`is_absolute`]'s documentation for more details.
|
||||||
///
|
///
|
||||||
|
@ -2019,7 +2019,7 @@ impl Path {
|
||||||
/// * Repeated separators are ignored, so `a/b` and `a//b` both have
|
/// * Repeated separators are ignored, so `a/b` and `a//b` both have
|
||||||
/// `a` and `b` as components.
|
/// `a` and `b` as components.
|
||||||
///
|
///
|
||||||
/// * Occurentces of `.` are normalized away, exept if they are at the
|
/// * Occurences of `.` are normalized away, except if they are at the
|
||||||
/// beginning of the path. For example, `a/./b`, `a/b/`, `a/b/.` and
|
/// beginning of the path. For example, `a/./b`, `a/b/`, `a/b/.` and
|
||||||
/// `a/b` all have `a` and `b` as components, but `./a/b` starts with
|
/// `a/b` all have `a` and `b` as components, but `./a/b` starts with
|
||||||
/// an additional [`CurDir`] component.
|
/// an additional [`CurDir`] component.
|
||||||
|
|
|
@ -8,16 +8,25 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
use libc;
|
|
||||||
use io;
|
use io;
|
||||||
use sys_common::backtrace::Frame;
|
use sys_common::backtrace::Frame;
|
||||||
|
|
||||||
pub use sys_common::gnu::libbacktrace::*;
|
pub use sys_common::gnu::libbacktrace::{foreach_symbol_fileline, resolve_symname};
|
||||||
pub struct BacktraceContext;
|
pub struct BacktraceContext;
|
||||||
|
|
||||||
#[inline(never)]
|
#[inline(never)]
|
||||||
pub fn unwind_backtrace(frames: &mut [Frame])
|
pub fn unwind_backtrace(_frames: &mut [Frame])
|
||||||
-> io::Result<(usize, BacktraceContext)>
|
-> io::Result<(usize, BacktraceContext)>
|
||||||
{
|
{
|
||||||
Ok((0, BacktraceContext))
|
Ok((0, BacktraceContext))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub mod gnu {
|
||||||
|
use io;
|
||||||
|
use fs;
|
||||||
|
use libc::c_char;
|
||||||
|
|
||||||
|
pub fn get_executable_filename() -> io::Result<(Vec<c_char>, fs::File)> {
|
||||||
|
Err(io::Error::new(io::ErrorKind::Other, "Not implemented"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ impl TcpStream {
|
||||||
Ok(TcpStream(File::open(&Path::new(path.as_str()), &options)?))
|
Ok(TcpStream(File::open(&Path::new(path.as_str()), &options)?))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn connect_timeout(_addr: &SocketAddr, _timeout: Duration) -> Result<()> {
|
pub fn connect_timeout(_addr: &SocketAddr, _timeout: Duration) -> Result<TcpStream> {
|
||||||
Err(Error::new(ErrorKind::Other, "TcpStream::connect_timeout not implemented"))
|
Err(Error::new(ErrorKind::Other, "TcpStream::connect_timeout not implemented"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -477,7 +477,7 @@ pub fn symlink_file<P: AsRef<Path>, Q: AsRef<Path>>(src: P, dst: Q)
|
||||||
/// use std::os::windows::fs;
|
/// use std::os::windows::fs;
|
||||||
///
|
///
|
||||||
/// # fn foo() -> std::io::Result<()> {
|
/// # fn foo() -> std::io::Result<()> {
|
||||||
/// fs::symlink_file("a", "b")?;
|
/// fs::symlink_dir("a", "b")?;
|
||||||
/// # Ok(())
|
/// # Ok(())
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
|
@ -52,7 +52,8 @@ pub mod net;
|
||||||
|
|
||||||
#[cfg(feature = "backtrace")]
|
#[cfg(feature = "backtrace")]
|
||||||
#[cfg(any(all(unix, not(any(target_os = "macos", target_os = "ios", target_os = "emscripten"))),
|
#[cfg(any(all(unix, not(any(target_os = "macos", target_os = "ios", target_os = "emscripten"))),
|
||||||
all(windows, target_env = "gnu")))]
|
all(windows, target_env = "gnu"),
|
||||||
|
target_os = "redox"))]
|
||||||
pub mod gnu;
|
pub mod gnu;
|
||||||
|
|
||||||
// common error constructors
|
// common error constructors
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue