Skip to content

Commit 623d611

Browse files
committed
Auto merge of rust-lang#89089 - JohnTitor:rollup-6s6mccx, r=JohnTitor
Rollup of 10 pull requests Successful merges: - rust-lang#87960 (Suggest replacing an inexisting field for an unmentioned field) - rust-lang#88855 (Allow simd_shuffle to accept vectors of any length) - rust-lang#88966 (Check for shadowing issues involving block labels) - rust-lang#88996 (Fix linting when trailing macro expands to a trailing semi) - rust-lang#89017 (fix potential race in AtomicU64 time monotonizer) - rust-lang#89021 (Add a separate error for `dyn Trait` in `const fn`) - rust-lang#89051 (Add intra-doc links and small changes to `std::os` to be more consistent) - rust-lang#89053 (refactor: VecDeques IntoIter fields to private) - rust-lang#89055 (Suggest better place to add call parentheses for method expressions wrapped in parentheses) - rust-lang#89081 (Fix a typo) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents bf650f4 + 4e7210b commit 623d611

File tree

21 files changed

+100
-47
lines changed

21 files changed

+100
-47
lines changed

alloc/src/collections/vec_deque/into_iter.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,13 @@ pub struct IntoIter<
1717
T,
1818
#[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
1919
> {
20-
pub(crate) inner: VecDeque<T, A>,
20+
inner: VecDeque<T, A>,
21+
}
22+
23+
impl<T, A: Allocator> IntoIter<T, A> {
24+
pub(super) fn new(inner: VecDeque<T, A>) -> Self {
25+
IntoIter { inner }
26+
}
2127
}
2228

2329
#[stable(feature = "collection_debug", since = "1.17.0")]

alloc/src/collections/vec_deque/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2827,7 +2827,7 @@ impl<T, A: Allocator> IntoIterator for VecDeque<T, A> {
28272827
/// Consumes the `VecDeque` into a front-to-back iterator yielding elements by
28282828
/// value.
28292829
fn into_iter(self) -> IntoIter<T, A> {
2830-
IntoIter { inner: self }
2830+
IntoIter::new(self)
28312831
}
28322832
}
28332833

std/src/error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ impl<'a, E: Error + 'a> From<E> for Box<dyn Error + 'a> {
182182
///
183183
/// impl fmt::Display for AnError {
184184
/// fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
185-
/// write!(f , "An error")
185+
/// write!(f, "An error")
186186
/// }
187187
/// }
188188
///
@@ -215,7 +215,7 @@ impl<'a, E: Error + Send + Sync + 'a> From<E> for Box<dyn Error + Send + Sync +
215215
///
216216
/// impl fmt::Display for AnError {
217217
/// fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
218-
/// write!(f , "An error")
218+
/// write!(f, "An error")
219219
/// }
220220
/// }
221221
///

std/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@
234234
#![feature(atomic_mut_ptr)]
235235
#![feature(auto_traits)]
236236
#![feature(bench_black_box)]
237+
#![feature(bool_to_option)]
237238
#![feature(box_syntax)]
238239
#![feature(c_unwind)]
239240
#![feature(c_variadic)]

std/src/os/linux/fs.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
//! Linux-specific extensions to primitives in the `std::fs` module.
1+
//! Linux-specific extensions to primitives in the [`std::fs`] module.
2+
//!
3+
//! [`std::fs`]: crate::fs
24
35
#![stable(feature = "metadata_ext", since = "1.1.0")]
46

std/src/os/linux/process.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
//! Linux-specific extensions to primitives in the `std::process` module.
1+
//! Linux-specific extensions to primitives in the [`std::process`] module.
2+
//!
3+
//! [`std::process`]: crate::process
24
35
#![unstable(feature = "linux_pidfd", issue = "82971")]
46

std/src/os/unix/ffi/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Unix-specific extension to the primitives in the `std::ffi` module.
1+
//! Unix-specific extensions to primitives in the [`std::ffi`] module.
22
//!
33
//! # Examples
44
//!
@@ -31,6 +31,8 @@
3131
//! let bytes = os_str.as_bytes();
3232
//! assert_eq!(bytes, b"foo");
3333
//! ```
34+
//!
35+
//! [`std::ffi`]: crate::ffi
3436
3537
#![stable(feature = "rust1", since = "1.0.0")]
3638

std/src/os/unix/fs.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
//! Unix-specific extensions to primitives in the `std::fs` module.
1+
//! Unix-specific extensions to primitives in the [`std::fs`] module.
2+
//!
3+
//! [`std::fs`]: crate::fs
24
35
#![stable(feature = "rust1", since = "1.0.0")]
46

std/src/os/unix/mod.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
//! exposes Unix-specific functions that would otherwise be inappropriate as
55
//! part of the core `std` library.
66
//!
7-
//! It exposes more ways to deal with platform-specific strings (`OsStr`,
8-
//! `OsString`), allows to set permissions more granularly, extract low-level
7+
//! It exposes more ways to deal with platform-specific strings ([`OsStr`],
8+
//! [`OsString`]), allows to set permissions more granularly, extract low-level
99
//! file descriptors from files and sockets, and has platform-specific helpers
1010
//! for spawning processes.
1111
//!
@@ -24,6 +24,9 @@
2424
//! Ok(())
2525
//! }
2626
//! ```
27+
//!
28+
//! [`OsStr`]: crate::ffi::OsStr
29+
//! [`OsString`]: crate::ffi::OsString
2730
2831
#![stable(feature = "rust1", since = "1.0.0")]
2932
#![doc(cfg(unix))]

std/src/os/unix/net/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Unix-specific networking functionality
1+
//! Unix-specific networking functionality.
22
33
#![stable(feature = "unix_socket", since = "1.10.0")]
44

0 commit comments

Comments
 (0)