Skip to content

Commit 58e967a

Browse files
committed
Auto merge of rust-lang#115518 - matthiaskrgr:rollup-vksprou, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - rust-lang#115279 (RangeFull: Remove parens around .. in documentation snippet) - rust-lang#115318 (Reference uplifted clippy lints' rustc name in the release notes) - rust-lang#115445 (remove some unused crate deps) - rust-lang#115489 (Use std::io::Error::is_interrupted everywhere) - rust-lang#115512 (Command::spawn: Fix STARTUPINFOW.cb being initialized with the address of size_of) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 21305f4 + 487fe2e commit 58e967a

File tree

17 files changed

+23
-30
lines changed

17 files changed

+23
-30
lines changed

Cargo.lock

-4
Original file line numberDiff line numberDiff line change
@@ -4228,7 +4228,6 @@ dependencies = [
42284228
"measureme",
42294229
"memoffset",
42304230
"rustc-rayon-core",
4231-
"rustc_ast",
42324231
"rustc_data_structures",
42334232
"rustc_errors",
42344233
"rustc_hir",
@@ -4437,15 +4436,12 @@ dependencies = [
44374436
name = "rustc_traits"
44384437
version = "0.0.0"
44394438
dependencies = [
4440-
"rustc_ast",
44414439
"rustc_data_structures",
44424440
"rustc_hir",
44434441
"rustc_infer",
44444442
"rustc_middle",
44454443
"rustc_span",
4446-
"rustc_target",
44474444
"rustc_trait_selection",
4448-
"smallvec",
44494445
"tracing",
44504446
]
44514447

RELEASES.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ Language
1010
- [expand: Change how `#![cfg(FALSE)]` behaves on crate root](https://github.com/rust-lang/rust/pull/110141/)
1111
- [Stabilize inline asm for LoongArch64](https://github.com/rust-lang/rust/pull/111235/)
1212
- [Uplift `clippy::undropped_manually_drops` lint](https://github.com/rust-lang/rust/pull/111530/)
13-
- [Uplift `clippy::invalid_utf8_in_unchecked` lint](https://github.com/rust-lang/rust/pull/111543/)
14-
- [Uplift `clippy::cast_ref_to_mut` lint](https://github.com/rust-lang/rust/pull/111567/)
15-
- [Uplift `clippy::cmp_nan` lint](https://github.com/rust-lang/rust/pull/111818/)
13+
- [Uplift `clippy::invalid_utf8_in_unchecked` lint](https://github.com/rust-lang/rust/pull/111543/) as `invalid_from_utf8_unchecked` and `invalid_from_utf8`
14+
- [Uplift `clippy::cast_ref_to_mut` lint](https://github.com/rust-lang/rust/pull/111567/) as `invalid_reference_casting`
15+
- [Uplift `clippy::cmp_nan` lint](https://github.com/rust-lang/rust/pull/111818/) as `invalid_nan_comparisons`
1616
- [resolve: Remove artificial import ambiguity errors](https://github.com/rust-lang/rust/pull/112086/)
1717
- [Don't require associated types with Self: Sized bounds in `dyn Trait` objects](https://github.com/rust-lang/rust/pull/112319/)
1818

compiler/rustc_query_impl/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ edition = "2021"
99
[dependencies]
1010
field-offset = "0.3.5"
1111
measureme = "10.0.0"
12-
rustc_ast = { path = "../rustc_ast" }
1312
rustc_data_structures = { path = "../rustc_data_structures" }
1413
rustc_errors = { path = "../rustc_errors" }
1514
rustc_hir = { path = "../rustc_hir" }

compiler/rustc_traits/Cargo.toml

-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ tracing = "0.1"
88
rustc_middle = { path = "../rustc_middle" }
99
rustc_data_structures = { path = "../rustc_data_structures" }
1010
rustc_hir = { path = "../rustc_hir" }
11-
rustc_ast = { path = "../rustc_ast" }
1211
rustc_span = { path = "../rustc_span" }
13-
rustc_target = { path = "../rustc_target" }
14-
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
1512
rustc_infer = { path = "../rustc_infer" }
1613
rustc_trait_selection = { path = "../rustc_trait_selection" }

library/core/src/ops/range.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::hash::Hash;
1111
/// The `..` syntax is a `RangeFull`:
1212
///
1313
/// ```
14-
/// assert_eq!((..), std::ops::RangeFull);
14+
/// assert_eq!(.., std::ops::RangeFull);
1515
/// ```
1616
///
1717
/// It does not have an [`IntoIterator`] implementation, so you can't use it in

library/std/src/io/buffered/bufwriter.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ impl<W: ?Sized + Write> BufWriter<W> {
237237
));
238238
}
239239
Ok(n) => guard.consume(n),
240-
Err(ref e) if e.kind() == io::ErrorKind::Interrupted => {}
240+
Err(ref e) if e.is_interrupted() => {}
241241
Err(e) => return Err(e),
242242
}
243243
}

library/std/src/io/copy.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use super::{BorrowedBuf, BufReader, BufWriter, ErrorKind, Read, Result, Write, DEFAULT_BUF_SIZE};
1+
use super::{BorrowedBuf, BufReader, BufWriter, Read, Result, Write, DEFAULT_BUF_SIZE};
22
use crate::alloc::Allocator;
33
use crate::cmp;
44
use crate::collections::VecDeque;
@@ -30,6 +30,7 @@ mod tests;
3030
///
3131
/// [`read`]: Read::read
3232
/// [`write`]: Write::write
33+
/// [`ErrorKind::Interrupted`]: crate::io::ErrorKind::Interrupted
3334
///
3435
/// # Examples
3536
///
@@ -163,7 +164,7 @@ where
163164
// from adding I: Read
164165
match self.read(&mut []) {
165166
Ok(_) => {}
166-
Err(e) if e.kind() == ErrorKind::Interrupted => continue,
167+
Err(e) if e.is_interrupted() => continue,
167168
Err(e) => return Err(e),
168169
}
169170
let buf = self.buffer();
@@ -243,7 +244,7 @@ impl<I: Write + ?Sized> BufferedWriterSpec for BufWriter<I> {
243244
// Read again if the buffer still has enough capacity, as BufWriter itself would do
244245
// This will occur if the reader returns short reads
245246
}
246-
Err(ref e) if e.kind() == ErrorKind::Interrupted => {}
247+
Err(ref e) if e.is_interrupted() => {}
247248
Err(e) => return Err(e),
248249
}
249250
} else {
@@ -275,7 +276,7 @@ impl<A: Allocator> BufferedWriterSpec for Vec<u8, A> {
275276
let mut buf: BorrowedBuf<'_> = self.spare_capacity_mut().into();
276277
match reader.read_buf(buf.unfilled()) {
277278
Ok(()) => {}
278-
Err(e) if e.kind() == ErrorKind::Interrupted => continue,
279+
Err(e) if e.is_interrupted() => continue,
279280
Err(e) => return Err(e),
280281
};
281282

@@ -307,7 +308,7 @@ fn stack_buffer_copy<R: Read + ?Sized, W: Write + ?Sized>(
307308
loop {
308309
match reader.read_buf(buf.unfilled()) {
309310
Ok(()) => {}
310-
Err(e) if e.kind() == ErrorKind::Interrupted => continue,
311+
Err(e) if e.is_interrupted() => continue,
311312
Err(e) => return Err(e),
312313
};
313314

library/std/src/io/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1647,7 +1647,7 @@ pub trait Write {
16471647
));
16481648
}
16491649
Ok(n) => IoSlice::advance_slices(&mut bufs, n),
1650-
Err(ref e) if e.kind() == ErrorKind::Interrupted => {}
1650+
Err(ref e) if e.is_interrupted() => {}
16511651
Err(e) => return Err(e),
16521652
}
16531653
}

library/std/src/os/unix/fs.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ pub trait FileExt {
123123
buf = &mut tmp[n..];
124124
offset += n as u64;
125125
}
126-
Err(ref e) if e.kind() == io::ErrorKind::Interrupted => {}
126+
Err(ref e) if e.is_interrupted() => {}
127127
Err(e) => return Err(e),
128128
}
129129
}
@@ -258,7 +258,7 @@ pub trait FileExt {
258258
buf = &buf[n..];
259259
offset += n as u64
260260
}
261-
Err(ref e) if e.kind() == io::ErrorKind::Interrupted => {}
261+
Err(ref e) if e.is_interrupted() => {}
262262
Err(e) => return Err(e),
263263
}
264264
}

library/std/src/os/wasi/fs.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ pub trait FileExt {
8282
buf = &mut tmp[n..];
8383
offset += n as u64;
8484
}
85-
Err(ref e) if e.kind() == io::ErrorKind::Interrupted => {}
85+
Err(ref e) if e.is_interrupted() => {}
8686
Err(e) => return Err(e),
8787
}
8888
}
@@ -162,7 +162,7 @@ pub trait FileExt {
162162
buf = &buf[n..];
163163
offset += n as u64
164164
}
165-
Err(ref e) if e.kind() == io::ErrorKind::Interrupted => {}
165+
Err(ref e) if e.is_interrupted() => {}
166166
Err(e) => return Err(e),
167167
}
168168
}

library/std/src/sys/hermit/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ where
200200
{
201201
loop {
202202
match cvt(f()) {
203-
Err(ref e) if e.kind() == ErrorKind::Interrupted => {}
203+
Err(ref e) if e.is_interrupted() => {}
204204
other => return other,
205205
}
206206
}

library/std/src/sys/hermit/net.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ impl Socket {
102102
match unsafe { netc::poll(&mut pollfd, 1, timeout) } {
103103
-1 => {
104104
let err = io::Error::last_os_error();
105-
if err.kind() != io::ErrorKind::Interrupted {
105+
if !err.is_interrupted() {
106106
return Err(err);
107107
}
108108
}

library/std/src/sys/unix/fs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ impl Drop for Dir {
792792
fn drop(&mut self) {
793793
let r = unsafe { libc::closedir(self.0) };
794794
assert!(
795-
r == 0 || crate::io::Error::last_os_error().kind() == crate::io::ErrorKind::Interrupted,
795+
r == 0 || crate::io::Error::last_os_error().is_interrupted(),
796796
"unexpected error during closedir: {:?}",
797797
crate::io::Error::last_os_error()
798798
);

library/std/src/sys/unix/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ where
320320
{
321321
loop {
322322
match cvt(f()) {
323-
Err(ref e) if e.kind() == ErrorKind::Interrupted => {}
323+
Err(ref e) if e.is_interrupted() => {}
324324
other => return other,
325325
}
326326
}

library/std/src/sys/unix/net.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ impl Socket {
184184
match unsafe { libc::poll(&mut pollfd, 1, timeout) } {
185185
-1 => {
186186
let err = io::Error::last_os_error();
187-
if err.kind() != io::ErrorKind::Interrupted {
187+
if !err.is_interrupted() {
188188
return Err(err);
189189
}
190190
}

library/std/src/sys/unix/process/process_unix.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ impl Command {
165165
assert!(p.wait().is_ok(), "wait() should either return Ok or panic");
166166
return Err(Error::from_raw_os_error(errno));
167167
}
168-
Err(ref e) if e.kind() == ErrorKind::Interrupted => {}
168+
Err(ref e) if e.is_interrupted() => {}
169169
Err(e) => {
170170
assert!(p.wait().is_ok(), "wait() should either return Ok or panic");
171171
panic!("the CLOEXEC pipe failed: {e:?}")

library/std/src/sys/windows/process.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ impl Command {
352352
};
353353
si_ptr = &mut si_ex as *mut _ as _;
354354
} else {
355-
si.cb = mem::size_of::<c::STARTUPINFOW> as c::DWORD;
355+
si.cb = mem::size_of::<c::STARTUPINFOW>() as c::DWORD;
356356
si_ptr = &mut si as *mut _ as _;
357357
}
358358

0 commit comments

Comments
 (0)