Skip to content

Commit b327f32

Browse files
github-actions[bot]randomPoisonkpreidscottmcmarjunr2
authored
Merge subtree update for toolchain nightly-2025-04-01 (#312)
This is an automated PR to merge library subtree updates from 2025-03-18 (rust-lang/rust@43a2e9d) to 2025-04-01 (rust-lang/rust@0b45675) (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: c60865a --------- Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn> Signed-off-by: Sean Cross <sean@xobs.io> Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com> Signed-off-by: Ayush Singh <ayush@beagleboard.org> Co-authored-by: Nicole LeGare <legare@google.com> Co-authored-by: Nicole LeGare <legaren@immunant.com> Co-authored-by: Nicole L <dlegare.1001@gmail.com> Co-authored-by: Kevin Reid <kpreid@switchb.org> Co-authored-by: Scott McMurray <scottmcm@users.noreply.github.com> Co-authored-by: Arjun Ramesh <arjunr2@andrew.cmu.edu> Co-authored-by: bors <bors@rust-lang.org> Co-authored-by: xizheyin <xizheyin@smail.nju.edu.cn> Co-authored-by: Pavel Grigorenko <GrigorenkoPV@ya.ru> Co-authored-by: Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> Co-authored-by: Trevor Gross <tmgross@umich.edu> Co-authored-by: Jakub Beránek <berykubik@gmail.com> Co-authored-by: Ralf Jung <post@ralfj.de> Co-authored-by: Sean Cross <sean@xobs.io> Co-authored-by: Aurelia Molzer <5550310+HeroicKatora@users.noreply.github.com> Co-authored-by: Eric Huss <eric@huss.org> Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com> Co-authored-by: Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> Co-authored-by: beetrees <b@beetr.ee> Co-authored-by: Josh Stone <jistone@redhat.com> Co-authored-by: Thalia Archibald <thalia@archibald.dev> Co-authored-by: Berrysoft <Strawberry_Str@hotmail.com> Co-authored-by: Mara Bos <m-ou.se@m-ou.se> Co-authored-by: Manish Goregaokar <manishsmail@gmail.com> Co-authored-by: ClearLove <98693523+DiuDiu777@users.noreply.github.com> Co-authored-by: Thom Chiovoloni <thom@shift.click> Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com> Co-authored-by: Michael Goulet <michael@errs.io> Co-authored-by: The Miri Cronjob Bot <miri@cron.bot> Co-authored-by: Jacob Pratt <jacob@jhpratt.dev> Co-authored-by: Tobias Bucher <tobiasbucher5991@gmail.com> Co-authored-by: León Orell Valerian Liehr <me@fmease.dev> Co-authored-by: Yotam Ofek <yotam.ofek@gmail.com> Co-authored-by: okaneco <47607823+okaneco@users.noreply.github.com> Co-authored-by: 许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com> Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com> Co-authored-by: Ayush Singh <ayush@beagleboard.org> Co-authored-by: Noratrieb <48135649+Noratrieb@users.noreply.github.com> Co-authored-by: Marijn Schouten <hkBst@users.noreply.github.com> Co-authored-by: Ibraheem Ahmed <ibraheem@ibraheem.ca> Co-authored-by: Chris Denton <chris@chrisdenton.dev> Co-authored-by: Taiki Endo <te316e89@gmail.com> Co-authored-by: bendn <bend.n@outlook.com> Co-authored-by: Caleb Zulawski <caleb.zulawski@gmail.com> Co-authored-by: Jana Dönszelmann <jana@donsz.nl> Co-authored-by: syvb <me@iter.ca> Co-authored-by: Sebastian Urban <surban@surban.net> Co-authored-by: Bardi Harborow <bardi@bardiharborow.com> Co-authored-by: moxian <moxian@users.noreply.github.com> Co-authored-by: Frank King <frankking1729@gmail.com> Co-authored-by: joboet <jonasboettiger@icloud.com> Co-authored-by: Takayuki Maeda <takoyaki0316@gmail.com> Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Co-authored-by: Mads Marquart <mads@marquart.dk> Co-authored-by: Christopher Durham <cad97@cad97.com> Co-authored-by: Rafael Bachmann <rafael.bachmann.93@gmail.com> Co-authored-by: Benoît du Garreau <benoit@dugarreau.fr> Co-authored-by: Daniel Henry-Mantilla <daniel.henry.mantilla@gmail.com> Co-authored-by: mejrs <59372212+mejrs@users.noreply.github.com> Co-authored-by: gitbot <git@bot> Co-authored-by: Michael Tautschnig <tautschn@amazon.com>
1 parent 9da1baa commit b327f32

File tree

156 files changed

+2930
-2253
lines changed

Some content is hidden

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

156 files changed

+2930
-2253
lines changed

library/Cargo.lock

Lines changed: 2 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

library/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ members = [
88
]
99

1010
exclude = [
11-
"literal-escaper",
1211
# stdarch has its own Cargo workspace
1312
"stdarch",
1413
"windows_targets"

library/alloc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ bench = false
1616

1717
[dependencies]
1818
core = { path = "../core", public = true }
19-
compiler_builtins = { version = "=0.1.151", features = ['rustc-dep-of-std'] }
19+
compiler_builtins = { version = "=0.1.152", features = ['rustc-dep-of-std'] }
2020
safety = { path = "../contracts/safety" }
2121

2222
[features]

library/alloc/src/alloc.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,28 @@ use core::ptr::{self, NonNull};
1010

1111
unsafe extern "Rust" {
1212
// These are the magic symbols to call the global allocator. rustc generates
13-
// them to call `__rg_alloc` etc. if there is a `#[global_allocator]` attribute
13+
// them to call the global allocator if there is a `#[global_allocator]` attribute
1414
// (the code expanding that attribute macro generates those functions), or to call
1515
// the default implementations in std (`__rdl_alloc` etc. in `library/std/src/alloc.rs`)
1616
// otherwise.
17-
// The rustc fork of LLVM 14 and earlier also special-cases these function names to be able to optimize them
18-
// like `malloc`, `realloc`, and `free`, respectively.
1917
#[rustc_allocator]
2018
#[rustc_nounwind]
19+
#[cfg_attr(not(bootstrap), rustc_std_internal_symbol)]
2120
fn __rust_alloc(size: usize, align: usize) -> *mut u8;
2221
#[rustc_deallocator]
2322
#[rustc_nounwind]
23+
#[cfg_attr(not(bootstrap), rustc_std_internal_symbol)]
2424
fn __rust_dealloc(ptr: *mut u8, size: usize, align: usize);
2525
#[rustc_reallocator]
2626
#[rustc_nounwind]
27+
#[cfg_attr(not(bootstrap), rustc_std_internal_symbol)]
2728
fn __rust_realloc(ptr: *mut u8, old_size: usize, align: usize, new_size: usize) -> *mut u8;
2829
#[rustc_allocator_zeroed]
2930
#[rustc_nounwind]
31+
#[cfg_attr(not(bootstrap), rustc_std_internal_symbol)]
3032
fn __rust_alloc_zeroed(size: usize, align: usize) -> *mut u8;
3133

34+
#[cfg_attr(not(bootstrap), rustc_std_internal_symbol)]
3235
static __rust_no_alloc_shim_is_unstable: u8;
3336
}
3437

@@ -357,6 +360,7 @@ unsafe extern "Rust" {
357360
// This is the magic symbol to call the global alloc error handler. rustc generates
358361
// it to call `__rg_oom` if there is a `#[alloc_error_handler]`, or to call the
359362
// default implementations below (`__rdl_oom`) otherwise.
363+
#[cfg_attr(not(bootstrap), rustc_std_internal_symbol)]
360364
fn __rust_alloc_error_handler(size: usize, align: usize) -> !;
361365
}
362366

@@ -423,6 +427,7 @@ pub mod __alloc_error_handler {
423427
unsafe extern "Rust" {
424428
// This symbol is emitted by rustc next to __rust_alloc_error_handler.
425429
// Its value depends on the -Zoom={panic,abort} compiler option.
430+
#[cfg_attr(not(bootstrap), rustc_std_internal_symbol)]
426431
static __rust_alloc_error_handler_should_panic: u8;
427432
}
428433

library/alloc/src/boxed.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,9 +1149,8 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
11491149
///
11501150
/// [memory layout]: self#memory-layout
11511151
#[unstable(feature = "allocator_api", issue = "32838")]
1152-
#[rustc_const_unstable(feature = "const_box", issue = "92521")]
11531152
#[inline]
1154-
pub const unsafe fn from_raw_in(raw: *mut T, alloc: A) -> Self {
1153+
pub unsafe fn from_raw_in(raw: *mut T, alloc: A) -> Self {
11551154
Box(unsafe { Unique::new_unchecked(raw) }, alloc)
11561155
}
11571156

@@ -1203,9 +1202,8 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
12031202
/// [memory layout]: self#memory-layout
12041203
#[unstable(feature = "allocator_api", issue = "32838")]
12051204
// #[unstable(feature = "box_vec_non_null", reason = "new API", issue = "130364")]
1206-
#[rustc_const_unstable(feature = "const_box", issue = "92521")]
12071205
#[inline]
1208-
pub const unsafe fn from_non_null_in(raw: NonNull<T>, alloc: A) -> Self {
1206+
pub unsafe fn from_non_null_in(raw: NonNull<T>, alloc: A) -> Self {
12091207
// SAFETY: guaranteed by the caller.
12101208
unsafe { Box::from_raw_in(raw.as_ptr(), alloc) }
12111209
}
@@ -1550,9 +1548,8 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
15501548
/// to call it as `Box::allocator(&b)` instead of `b.allocator()`. This
15511549
/// is so that there is no conflict with a method on the inner type.
15521550
#[unstable(feature = "allocator_api", issue = "32838")]
1553-
#[rustc_const_unstable(feature = "const_box", issue = "92521")]
15541551
#[inline]
1555-
pub const fn allocator(b: &Self) -> &A {
1552+
pub fn allocator(b: &Self) -> &A {
15561553
&b.1
15571554
}
15581555

@@ -1639,8 +1636,7 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
16391636
/// let bar = Pin::from(foo);
16401637
/// ```
16411638
#[stable(feature = "box_into_pin", since = "1.63.0")]
1642-
#[rustc_const_unstable(feature = "const_box", issue = "92521")]
1643-
pub const fn into_pin(boxed: Self) -> Pin<Self>
1639+
pub fn into_pin(boxed: Self) -> Pin<Self>
16441640
where
16451641
A: 'static,
16461642
{

0 commit comments

Comments
 (0)