Skip to content

Commit ebae8ab

Browse files
github-actions[bot]gitbottautschnig
authored
Merge subtree update for toolchain nightly-2025-03-17 (#290)
This is an automated PR to merge library subtree updates from 2025-03-13 (249cb84) to 2025-03-17 (227690a) (inclusive) into main. `git merge` resulted in conflicts, which require manual resolution. Files were commited with merge conflict markers. **Do not remove or edit the following annotations:** git-subtree-dir: library git-subtree-split: 976d3e0 --------- Co-authored-by: gitbot <git@bot> Co-authored-by: Michael Tautschnig <[email protected]>
1 parent 9aa99c3 commit ebae8ab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+1299
-975
lines changed

library/Cargo.lock

+28-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

library/alloc/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ repository = "https://github.com/rust-lang/rust.git"
88
description = "The Rust core allocation and collections library"
99
autotests = false
1010
autobenches = false
11-
edition = "2021"
11+
edition = "2024"
1212

1313
[lib]
1414
test = false

library/alloc/src/rc.rs

+23-11
Original file line numberDiff line numberDiff line change
@@ -1327,11 +1327,14 @@ impl<T: ?Sized> Rc<T> {
13271327
///
13281328
/// # Safety
13291329
///
1330-
/// The pointer must have been obtained through `Rc::into_raw`, the
1331-
/// associated `Rc` instance must be valid (i.e. the strong count must be at
1330+
/// The pointer must have been obtained through `Rc::into_raw` and must satisfy the
1331+
/// same layout requirements specified in [`Rc::from_raw_in`][from_raw_in].
1332+
/// The associated `Rc` instance must be valid (i.e. the strong count must be at
13321333
/// least 1) for the duration of this method, and `ptr` must point to a block of memory
13331334
/// allocated by the global allocator.
13341335
///
1336+
/// [from_raw_in]: Rc::from_raw_in
1337+
///
13351338
/// # Examples
13361339
///
13371340
/// ```
@@ -1360,12 +1363,15 @@ impl<T: ?Sized> Rc<T> {
13601363
///
13611364
/// # Safety
13621365
///
1363-
/// The pointer must have been obtained through `Rc::into_raw`, the
1364-
/// associated `Rc` instance must be valid (i.e. the strong count must be at
1366+
/// The pointer must have been obtained through `Rc::into_raw`and must satisfy the
1367+
/// same layout requirements specified in [`Rc::from_raw_in`][from_raw_in].
1368+
/// The associated `Rc` instance must be valid (i.e. the strong count must be at
13651369
/// least 1) when invoking this method, and `ptr` must point to a block of memory
13661370
/// allocated by the global allocator. This method can be used to release the final `Rc` and
13671371
/// backing storage, but **should not** be called after the final `Rc` has been released.
13681372
///
1373+
/// [from_raw_in]: Rc::from_raw_in
1374+
///
13691375
/// # Examples
13701376
///
13711377
/// ```
@@ -1623,10 +1629,13 @@ impl<T: ?Sized, A: Allocator> Rc<T, A> {
16231629
///
16241630
/// # Safety
16251631
///
1626-
/// The pointer must have been obtained through `Rc::into_raw`, the
1627-
/// associated `Rc` instance must be valid (i.e. the strong count must be at
1632+
/// The pointer must have been obtained through `Rc::into_raw` and must satisfy the
1633+
/// same layout requirements specified in [`Rc::from_raw_in`][from_raw_in].
1634+
/// The associated `Rc` instance must be valid (i.e. the strong count must be at
16281635
/// least 1) for the duration of this method, and `ptr` must point to a block of memory
1629-
/// allocated by `alloc`
1636+
/// allocated by `alloc`.
1637+
///
1638+
/// [from_raw_in]: Rc::from_raw_in
16301639
///
16311640
/// # Examples
16321641
///
@@ -1665,11 +1674,14 @@ impl<T: ?Sized, A: Allocator> Rc<T, A> {
16651674
///
16661675
/// # Safety
16671676
///
1668-
/// The pointer must have been obtained through `Rc::into_raw`, the
1669-
/// associated `Rc` instance must be valid (i.e. the strong count must be at
1677+
/// The pointer must have been obtained through `Rc::into_raw`and must satisfy the
1678+
/// same layout requirements specified in [`Rc::from_raw_in`][from_raw_in].
1679+
/// The associated `Rc` instance must be valid (i.e. the strong count must be at
16701680
/// least 1) when invoking this method, and `ptr` must point to a block of memory
1671-
/// allocated by `alloc`. This method can be used to release the final `Rc` and backing storage,
1672-
/// but **should not** be called after the final `Rc` has been released.
1681+
/// allocated by `alloc`. This method can be used to release the final `Rc` and
1682+
/// backing storage, but **should not** be called after the final `Rc` has been released.
1683+
///
1684+
/// [from_raw_in]: Rc::from_raw_in
16731685
///
16741686
/// # Examples
16751687
///

library/alloc/src/sync.rs

+21-9
Original file line numberDiff line numberDiff line change
@@ -1453,11 +1453,14 @@ impl<T: ?Sized> Arc<T> {
14531453
///
14541454
/// # Safety
14551455
///
1456-
/// The pointer must have been obtained through `Arc::into_raw`, and the
1457-
/// associated `Arc` instance must be valid (i.e. the strong count must be at
1456+
/// The pointer must have been obtained through `Arc::into_raw` and must satisfy the
1457+
/// same layout requirements specified in [`Arc::from_raw_in`][from_raw_in].
1458+
/// The associated `Arc` instance must be valid (i.e. the strong count must be at
14581459
/// least 1) for the duration of this method, and `ptr` must point to a block of memory
14591460
/// allocated by the global allocator.
14601461
///
1462+
/// [from_raw_in]: Arc::from_raw_in
1463+
///
14611464
/// # Examples
14621465
///
14631466
/// ```
@@ -1488,13 +1491,16 @@ impl<T: ?Sized> Arc<T> {
14881491
///
14891492
/// # Safety
14901493
///
1491-
/// The pointer must have been obtained through `Arc::into_raw`, and the
1492-
/// associated `Arc` instance must be valid (i.e. the strong count must be at
1494+
/// The pointer must have been obtained through `Arc::into_raw` and must satisfy the
1495+
/// same layout requirements specified in [`Arc::from_raw_in`][from_raw_in].
1496+
/// The associated `Arc` instance must be valid (i.e. the strong count must be at
14931497
/// least 1) when invoking this method, and `ptr` must point to a block of memory
14941498
/// allocated by the global allocator. This method can be used to release the final
14951499
/// `Arc` and backing storage, but **should not** be called after the final `Arc` has been
14961500
/// released.
14971501
///
1502+
/// [from_raw_in]: Arc::from_raw_in
1503+
///
14981504
/// # Examples
14991505
///
15001506
/// ```
@@ -1806,11 +1812,14 @@ impl<T: ?Sized, A: Allocator> Arc<T, A> {
18061812
///
18071813
/// # Safety
18081814
///
1809-
/// The pointer must have been obtained through `Arc::into_raw`, and the
1810-
/// associated `Arc` instance must be valid (i.e. the strong count must be at
1811-
/// least 1) for the duration of this method,, and `ptr` must point to a block of memory
1815+
/// The pointer must have been obtained through `Arc::into_raw` and must satisfy the
1816+
/// same layout requirements specified in [`Arc::from_raw_in`][from_raw_in].
1817+
/// The associated `Arc` instance must be valid (i.e. the strong count must be at
1818+
/// least 1) for the duration of this method, and `ptr` must point to a block of memory
18121819
/// allocated by `alloc`.
18131820
///
1821+
/// [from_raw_in]: Arc::from_raw_in
1822+
///
18141823
/// # Examples
18151824
///
18161825
/// ```
@@ -1850,13 +1859,16 @@ impl<T: ?Sized, A: Allocator> Arc<T, A> {
18501859
///
18511860
/// # Safety
18521861
///
1853-
/// The pointer must have been obtained through `Arc::into_raw`, the
1854-
/// associated `Arc` instance must be valid (i.e. the strong count must be at
1862+
/// The pointer must have been obtained through `Arc::into_raw` and must satisfy the
1863+
/// same layout requirements specified in [`Arc::from_raw_in`][from_raw_in].
1864+
/// The associated `Arc` instance must be valid (i.e. the strong count must be at
18551865
/// least 1) when invoking this method, and `ptr` must point to a block of memory
18561866
/// allocated by `alloc`. This method can be used to release the final
18571867
/// `Arc` and backing storage, but **should not** be called after the final `Arc` has been
18581868
/// released.
18591869
///
1870+
/// [from_raw_in]: Arc::from_raw_in
1871+
///
18601872
/// # Examples
18611873
///
18621874
/// ```

library/core/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ autobenches = false
99
# If you update this, be sure to update it in a bunch of other places too!
1010
# As of 2024, it was src/tools/opt-dist, the core-no-fp-fmt-parse test and
1111
# the version of the prelude imported in core/lib.rs.
12-
edition = "2021"
12+
edition = "2024"
1313

1414
[lib]
1515
test = false

library/core/src/any.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ use crate::{fmt, hash, intrinsics};
109109
// unsafe traits and unsafe methods (i.e., `type_id` would still be safe to call,
110110
// but we would likely want to indicate as such in documentation).
111111
#[stable(feature = "rust1", since = "1.0.0")]
112-
#[cfg_attr(not(test), rustc_diagnostic_item = "Any")]
112+
#[rustc_diagnostic_item = "Any"]
113113
pub trait Any: 'static {
114114
/// Gets the `TypeId` of `self`.
115115
///

library/core/src/array/ascii.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use crate::ascii;
22

3-
#[cfg(not(test))]
43
impl<const N: usize> [u8; N] {
54
/// Converts this array of bytes into an array of ASCII characters,
65
/// or returns `None` if any of the characters is non-ASCII.

library/core/src/bool.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ impl bool {
5656
/// ```
5757
#[doc(alias = "then_with")]
5858
#[stable(feature = "lazy_bool_to_option", since = "1.50.0")]
59-
#[cfg_attr(not(test), rustc_diagnostic_item = "bool_then")]
59+
#[rustc_diagnostic_item = "bool_then"]
6060
#[inline]
6161
pub fn then<T, F: FnOnce() -> T>(self, f: F) -> Option<T> {
6262
if self { Some(f()) } else { None }

library/core/src/cell.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ pub use once::OnceCell;
304304
/// ```
305305
///
306306
/// See the [module-level documentation](self) for more.
307-
#[cfg_attr(not(test), rustc_diagnostic_item = "Cell")]
307+
#[rustc_diagnostic_item = "Cell"]
308308
#[stable(feature = "rust1", since = "1.0.0")]
309309
#[repr(transparent)]
310310
#[rustc_pub_transparent]
@@ -725,7 +725,7 @@ impl<T, const N: usize> Cell<[T; N]> {
725725
/// A mutable memory location with dynamically checked borrow rules
726726
///
727727
/// See the [module-level documentation](self) for more.
728-
#[cfg_attr(not(test), rustc_diagnostic_item = "RefCell")]
728+
#[rustc_diagnostic_item = "RefCell"]
729729
#[stable(feature = "rust1", since = "1.0.0")]
730730
pub struct RefCell<T: ?Sized> {
731731
borrow: Cell<BorrowFlag>,

library/core/src/char/methods.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,7 @@ impl char {
11801180
#[must_use]
11811181
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
11821182
#[rustc_const_stable(feature = "const_char_is_ascii", since = "1.32.0")]
1183-
#[cfg_attr(not(test), rustc_diagnostic_item = "char_is_ascii")]
1183+
#[rustc_diagnostic_item = "char_is_ascii"]
11841184
#[inline]
11851185
pub const fn is_ascii(&self) -> bool {
11861186
*self as u32 <= 0x7F

0 commit comments

Comments
 (0)