Auto merge of #115518 - matthiaskrgr:rollup-vksprou, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - #115279 (RangeFull: Remove parens around .. in documentation snippet) - #115318 (Reference uplifted clippy lints' rustc name in the release notes) - #115445 (remove some unused crate deps) - #115489 (Use std::io::Error::is_interrupted everywhere) - #115512 (Command::spawn: Fix STARTUPINFOW.cb being initialized with the address of size_of) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
58e967a9cc
17 changed files with 23 additions and 30 deletions
|
@ -4228,7 +4228,6 @@ dependencies = [
|
||||||
"measureme",
|
"measureme",
|
||||||
"memoffset",
|
"memoffset",
|
||||||
"rustc-rayon-core",
|
"rustc-rayon-core",
|
||||||
"rustc_ast",
|
|
||||||
"rustc_data_structures",
|
"rustc_data_structures",
|
||||||
"rustc_errors",
|
"rustc_errors",
|
||||||
"rustc_hir",
|
"rustc_hir",
|
||||||
|
@ -4437,15 +4436,12 @@ dependencies = [
|
||||||
name = "rustc_traits"
|
name = "rustc_traits"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"rustc_ast",
|
|
||||||
"rustc_data_structures",
|
"rustc_data_structures",
|
||||||
"rustc_hir",
|
"rustc_hir",
|
||||||
"rustc_infer",
|
"rustc_infer",
|
||||||
"rustc_middle",
|
"rustc_middle",
|
||||||
"rustc_span",
|
"rustc_span",
|
||||||
"rustc_target",
|
|
||||||
"rustc_trait_selection",
|
"rustc_trait_selection",
|
||||||
"smallvec",
|
|
||||||
"tracing",
|
"tracing",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,9 @@ Language
|
||||||
- [expand: Change how `#![cfg(FALSE)]` behaves on crate root](https://github.com/rust-lang/rust/pull/110141/)
|
- [expand: Change how `#![cfg(FALSE)]` behaves on crate root](https://github.com/rust-lang/rust/pull/110141/)
|
||||||
- [Stabilize inline asm for LoongArch64](https://github.com/rust-lang/rust/pull/111235/)
|
- [Stabilize inline asm for LoongArch64](https://github.com/rust-lang/rust/pull/111235/)
|
||||||
- [Uplift `clippy::undropped_manually_drops` lint](https://github.com/rust-lang/rust/pull/111530/)
|
- [Uplift `clippy::undropped_manually_drops` lint](https://github.com/rust-lang/rust/pull/111530/)
|
||||||
- [Uplift `clippy::invalid_utf8_in_unchecked` lint](https://github.com/rust-lang/rust/pull/111543/)
|
- [Uplift `clippy::invalid_utf8_in_unchecked` lint](https://github.com/rust-lang/rust/pull/111543/) as `invalid_from_utf8_unchecked` and `invalid_from_utf8`
|
||||||
- [Uplift `clippy::cast_ref_to_mut` lint](https://github.com/rust-lang/rust/pull/111567/)
|
- [Uplift `clippy::cast_ref_to_mut` lint](https://github.com/rust-lang/rust/pull/111567/) as `invalid_reference_casting`
|
||||||
- [Uplift `clippy::cmp_nan` lint](https://github.com/rust-lang/rust/pull/111818/)
|
- [Uplift `clippy::cmp_nan` lint](https://github.com/rust-lang/rust/pull/111818/) as `invalid_nan_comparisons`
|
||||||
- [resolve: Remove artificial import ambiguity errors](https://github.com/rust-lang/rust/pull/112086/)
|
- [resolve: Remove artificial import ambiguity errors](https://github.com/rust-lang/rust/pull/112086/)
|
||||||
- [Don't require associated types with Self: Sized bounds in `dyn Trait` objects](https://github.com/rust-lang/rust/pull/112319/)
|
- [Don't require associated types with Self: Sized bounds in `dyn Trait` objects](https://github.com/rust-lang/rust/pull/112319/)
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@ edition = "2021"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
field-offset = "0.3.5"
|
field-offset = "0.3.5"
|
||||||
measureme = "10.0.0"
|
measureme = "10.0.0"
|
||||||
rustc_ast = { path = "../rustc_ast" }
|
|
||||||
rustc_data_structures = { path = "../rustc_data_structures" }
|
rustc_data_structures = { path = "../rustc_data_structures" }
|
||||||
rustc_errors = { path = "../rustc_errors" }
|
rustc_errors = { path = "../rustc_errors" }
|
||||||
rustc_hir = { path = "../rustc_hir" }
|
rustc_hir = { path = "../rustc_hir" }
|
||||||
|
|
|
@ -8,9 +8,6 @@ tracing = "0.1"
|
||||||
rustc_middle = { path = "../rustc_middle" }
|
rustc_middle = { path = "../rustc_middle" }
|
||||||
rustc_data_structures = { path = "../rustc_data_structures" }
|
rustc_data_structures = { path = "../rustc_data_structures" }
|
||||||
rustc_hir = { path = "../rustc_hir" }
|
rustc_hir = { path = "../rustc_hir" }
|
||||||
rustc_ast = { path = "../rustc_ast" }
|
|
||||||
rustc_span = { path = "../rustc_span" }
|
rustc_span = { path = "../rustc_span" }
|
||||||
rustc_target = { path = "../rustc_target" }
|
|
||||||
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
|
|
||||||
rustc_infer = { path = "../rustc_infer" }
|
rustc_infer = { path = "../rustc_infer" }
|
||||||
rustc_trait_selection = { path = "../rustc_trait_selection" }
|
rustc_trait_selection = { path = "../rustc_trait_selection" }
|
||||||
|
|
|
@ -11,7 +11,7 @@ use crate::hash::Hash;
|
||||||
/// The `..` syntax is a `RangeFull`:
|
/// The `..` syntax is a `RangeFull`:
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// assert_eq!((..), std::ops::RangeFull);
|
/// assert_eq!(.., std::ops::RangeFull);
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// It does not have an [`IntoIterator`] implementation, so you can't use it in
|
/// It does not have an [`IntoIterator`] implementation, so you can't use it in
|
||||||
|
|
|
@ -237,7 +237,7 @@ impl<W: ?Sized + Write> BufWriter<W> {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
Ok(n) => guard.consume(n),
|
Ok(n) => guard.consume(n),
|
||||||
Err(ref e) if e.kind() == io::ErrorKind::Interrupted => {}
|
Err(ref e) if e.is_interrupted() => {}
|
||||||
Err(e) => return Err(e),
|
Err(e) => return Err(e),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use super::{BorrowedBuf, BufReader, BufWriter, ErrorKind, Read, Result, Write, DEFAULT_BUF_SIZE};
|
use super::{BorrowedBuf, BufReader, BufWriter, Read, Result, Write, DEFAULT_BUF_SIZE};
|
||||||
use crate::alloc::Allocator;
|
use crate::alloc::Allocator;
|
||||||
use crate::cmp;
|
use crate::cmp;
|
||||||
use crate::collections::VecDeque;
|
use crate::collections::VecDeque;
|
||||||
|
@ -30,6 +30,7 @@ mod tests;
|
||||||
///
|
///
|
||||||
/// [`read`]: Read::read
|
/// [`read`]: Read::read
|
||||||
/// [`write`]: Write::write
|
/// [`write`]: Write::write
|
||||||
|
/// [`ErrorKind::Interrupted`]: crate::io::ErrorKind::Interrupted
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
|
@ -163,7 +164,7 @@ where
|
||||||
// from adding I: Read
|
// from adding I: Read
|
||||||
match self.read(&mut []) {
|
match self.read(&mut []) {
|
||||||
Ok(_) => {}
|
Ok(_) => {}
|
||||||
Err(e) if e.kind() == ErrorKind::Interrupted => continue,
|
Err(e) if e.is_interrupted() => continue,
|
||||||
Err(e) => return Err(e),
|
Err(e) => return Err(e),
|
||||||
}
|
}
|
||||||
let buf = self.buffer();
|
let buf = self.buffer();
|
||||||
|
@ -243,7 +244,7 @@ impl<I: Write + ?Sized> BufferedWriterSpec for BufWriter<I> {
|
||||||
// Read again if the buffer still has enough capacity, as BufWriter itself would do
|
// Read again if the buffer still has enough capacity, as BufWriter itself would do
|
||||||
// This will occur if the reader returns short reads
|
// This will occur if the reader returns short reads
|
||||||
}
|
}
|
||||||
Err(ref e) if e.kind() == ErrorKind::Interrupted => {}
|
Err(ref e) if e.is_interrupted() => {}
|
||||||
Err(e) => return Err(e),
|
Err(e) => return Err(e),
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -275,7 +276,7 @@ impl<A: Allocator> BufferedWriterSpec for Vec<u8, A> {
|
||||||
let mut buf: BorrowedBuf<'_> = self.spare_capacity_mut().into();
|
let mut buf: BorrowedBuf<'_> = self.spare_capacity_mut().into();
|
||||||
match reader.read_buf(buf.unfilled()) {
|
match reader.read_buf(buf.unfilled()) {
|
||||||
Ok(()) => {}
|
Ok(()) => {}
|
||||||
Err(e) if e.kind() == ErrorKind::Interrupted => continue,
|
Err(e) if e.is_interrupted() => continue,
|
||||||
Err(e) => return Err(e),
|
Err(e) => return Err(e),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -307,7 +308,7 @@ fn stack_buffer_copy<R: Read + ?Sized, W: Write + ?Sized>(
|
||||||
loop {
|
loop {
|
||||||
match reader.read_buf(buf.unfilled()) {
|
match reader.read_buf(buf.unfilled()) {
|
||||||
Ok(()) => {}
|
Ok(()) => {}
|
||||||
Err(e) if e.kind() == ErrorKind::Interrupted => continue,
|
Err(e) if e.is_interrupted() => continue,
|
||||||
Err(e) => return Err(e),
|
Err(e) => return Err(e),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1647,7 +1647,7 @@ pub trait Write {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
Ok(n) => IoSlice::advance_slices(&mut bufs, n),
|
Ok(n) => IoSlice::advance_slices(&mut bufs, n),
|
||||||
Err(ref e) if e.kind() == ErrorKind::Interrupted => {}
|
Err(ref e) if e.is_interrupted() => {}
|
||||||
Err(e) => return Err(e),
|
Err(e) => return Err(e),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,7 +123,7 @@ pub trait FileExt {
|
||||||
buf = &mut tmp[n..];
|
buf = &mut tmp[n..];
|
||||||
offset += n as u64;
|
offset += n as u64;
|
||||||
}
|
}
|
||||||
Err(ref e) if e.kind() == io::ErrorKind::Interrupted => {}
|
Err(ref e) if e.is_interrupted() => {}
|
||||||
Err(e) => return Err(e),
|
Err(e) => return Err(e),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -258,7 +258,7 @@ pub trait FileExt {
|
||||||
buf = &buf[n..];
|
buf = &buf[n..];
|
||||||
offset += n as u64
|
offset += n as u64
|
||||||
}
|
}
|
||||||
Err(ref e) if e.kind() == io::ErrorKind::Interrupted => {}
|
Err(ref e) if e.is_interrupted() => {}
|
||||||
Err(e) => return Err(e),
|
Err(e) => return Err(e),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,7 @@ pub trait FileExt {
|
||||||
buf = &mut tmp[n..];
|
buf = &mut tmp[n..];
|
||||||
offset += n as u64;
|
offset += n as u64;
|
||||||
}
|
}
|
||||||
Err(ref e) if e.kind() == io::ErrorKind::Interrupted => {}
|
Err(ref e) if e.is_interrupted() => {}
|
||||||
Err(e) => return Err(e),
|
Err(e) => return Err(e),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -162,7 +162,7 @@ pub trait FileExt {
|
||||||
buf = &buf[n..];
|
buf = &buf[n..];
|
||||||
offset += n as u64
|
offset += n as u64
|
||||||
}
|
}
|
||||||
Err(ref e) if e.kind() == io::ErrorKind::Interrupted => {}
|
Err(ref e) if e.is_interrupted() => {}
|
||||||
Err(e) => return Err(e),
|
Err(e) => return Err(e),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -200,7 +200,7 @@ where
|
||||||
{
|
{
|
||||||
loop {
|
loop {
|
||||||
match cvt(f()) {
|
match cvt(f()) {
|
||||||
Err(ref e) if e.kind() == ErrorKind::Interrupted => {}
|
Err(ref e) if e.is_interrupted() => {}
|
||||||
other => return other,
|
other => return other,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,7 @@ impl Socket {
|
||||||
match unsafe { netc::poll(&mut pollfd, 1, timeout) } {
|
match unsafe { netc::poll(&mut pollfd, 1, timeout) } {
|
||||||
-1 => {
|
-1 => {
|
||||||
let err = io::Error::last_os_error();
|
let err = io::Error::last_os_error();
|
||||||
if err.kind() != io::ErrorKind::Interrupted {
|
if !err.is_interrupted() {
|
||||||
return Err(err);
|
return Err(err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -792,7 +792,7 @@ impl Drop for Dir {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
let r = unsafe { libc::closedir(self.0) };
|
let r = unsafe { libc::closedir(self.0) };
|
||||||
assert!(
|
assert!(
|
||||||
r == 0 || crate::io::Error::last_os_error().kind() == crate::io::ErrorKind::Interrupted,
|
r == 0 || crate::io::Error::last_os_error().is_interrupted(),
|
||||||
"unexpected error during closedir: {:?}",
|
"unexpected error during closedir: {:?}",
|
||||||
crate::io::Error::last_os_error()
|
crate::io::Error::last_os_error()
|
||||||
);
|
);
|
||||||
|
|
|
@ -320,7 +320,7 @@ where
|
||||||
{
|
{
|
||||||
loop {
|
loop {
|
||||||
match cvt(f()) {
|
match cvt(f()) {
|
||||||
Err(ref e) if e.kind() == ErrorKind::Interrupted => {}
|
Err(ref e) if e.is_interrupted() => {}
|
||||||
other => return other,
|
other => return other,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -184,7 +184,7 @@ impl Socket {
|
||||||
match unsafe { libc::poll(&mut pollfd, 1, timeout) } {
|
match unsafe { libc::poll(&mut pollfd, 1, timeout) } {
|
||||||
-1 => {
|
-1 => {
|
||||||
let err = io::Error::last_os_error();
|
let err = io::Error::last_os_error();
|
||||||
if err.kind() != io::ErrorKind::Interrupted {
|
if !err.is_interrupted() {
|
||||||
return Err(err);
|
return Err(err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,7 +165,7 @@ impl Command {
|
||||||
assert!(p.wait().is_ok(), "wait() should either return Ok or panic");
|
assert!(p.wait().is_ok(), "wait() should either return Ok or panic");
|
||||||
return Err(Error::from_raw_os_error(errno));
|
return Err(Error::from_raw_os_error(errno));
|
||||||
}
|
}
|
||||||
Err(ref e) if e.kind() == ErrorKind::Interrupted => {}
|
Err(ref e) if e.is_interrupted() => {}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
assert!(p.wait().is_ok(), "wait() should either return Ok or panic");
|
assert!(p.wait().is_ok(), "wait() should either return Ok or panic");
|
||||||
panic!("the CLOEXEC pipe failed: {e:?}")
|
panic!("the CLOEXEC pipe failed: {e:?}")
|
||||||
|
|
|
@ -352,7 +352,7 @@ impl Command {
|
||||||
};
|
};
|
||||||
si_ptr = &mut si_ex as *mut _ as _;
|
si_ptr = &mut si_ex as *mut _ as _;
|
||||||
} else {
|
} else {
|
||||||
si.cb = mem::size_of::<c::STARTUPINFOW> as c::DWORD;
|
si.cb = mem::size_of::<c::STARTUPINFOW>() as c::DWORD;
|
||||||
si_ptr = &mut si as *mut _ as _;
|
si_ptr = &mut si as *mut _ as _;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue