Skip to content

Commit 4d5609f

Browse files
committed
Auto merge of rust-lang#130179 - workingjubilee:rollup-l78cv44, r=workingjubilee
Rollup of 11 pull requests Successful merges: - rust-lang#128316 (Stabilize most of `io_error_more`) - rust-lang#129473 (use `download-ci-llvm=true` in the default compiler config) - rust-lang#129529 (Add test to build crates used by r-a on stable) - rust-lang#129981 (Remove `serialized_bitcode` from `LtoModuleCodegen`.) - rust-lang#130094 (Inform the solver if evaluation is concurrent) - rust-lang#130132 ([illumos] enable SIGSEGV handler to detect stack overflows) - rust-lang#130146 (bootstrap `naked_asm!` for `compiler-builtins`) - rust-lang#130149 (Helper function for formatting with `LifetimeSuggestionPosition`) - rust-lang#130152 (adapt a test for llvm 20) - rust-lang#130162 (bump download-ci-llvm-stamp) - rust-lang#130164 (move some const fn out of the const_ptr_as_ref feature) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 237b11d + 7e4cfbc commit 4d5609f

File tree

6 files changed

+57
-36
lines changed

6 files changed

+57
-36
lines changed

core/src/arch.rs

+14
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,20 @@ pub macro asm("assembly template", $(operands,)* $(options($(option),*))?) {
1717
/* compiler built-in */
1818
}
1919

20+
/// Inline assembly used in combination with `#[naked]` functions.
21+
///
22+
/// Refer to [Rust By Example] for a usage guide and the [reference] for
23+
/// detailed information about the syntax and available options.
24+
///
25+
/// [Rust By Example]: https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html
26+
/// [reference]: https://doc.rust-lang.org/nightly/reference/inline-assembly.html
27+
#[unstable(feature = "naked_functions", issue = "90957")]
28+
#[rustc_builtin_macro]
29+
#[cfg(not(bootstrap))]
30+
pub macro naked_asm("assembly template", $(operands,)* $(options($(option),*))?) {
31+
/* compiler built-in */
32+
}
33+
2034
/// Module-level inline assembly.
2135
///
2236
/// Refer to [Rust By Example] for a usage guide and the [reference] for

core/src/ptr/const_ptr.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ impl<T: ?Sized> *const T {
270270
/// }
271271
/// ```
272272
#[stable(feature = "ptr_as_ref", since = "1.9.0")]
273-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
273+
#[rustc_const_unstable(feature = "const_ptr_is_null", issue = "74939")]
274274
#[inline]
275275
pub const unsafe fn as_ref<'a>(self) -> Option<&'a T> {
276276
// SAFETY: the caller must guarantee that `self` is valid
@@ -302,7 +302,7 @@ impl<T: ?Sized> *const T {
302302
/// ```
303303
// FIXME: mention it in the docs for `as_ref` and `as_uninit_ref` once stabilized.
304304
#[unstable(feature = "ptr_as_ref_unchecked", issue = "122034")]
305-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
305+
#[rustc_const_unstable(feature = "ptr_as_ref_unchecked", issue = "122034")]
306306
#[inline]
307307
#[must_use]
308308
pub const unsafe fn as_ref_unchecked<'a>(self) -> &'a T {
@@ -336,7 +336,7 @@ impl<T: ?Sized> *const T {
336336
/// ```
337337
#[inline]
338338
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
339-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
339+
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
340340
pub const unsafe fn as_uninit_ref<'a>(self) -> Option<&'a MaybeUninit<T>>
341341
where
342342
T: Sized,
@@ -1664,7 +1664,7 @@ impl<T> *const [T] {
16641664
/// [allocated object]: crate::ptr#allocated-object
16651665
#[inline]
16661666
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
1667-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
1667+
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
16681668
pub const unsafe fn as_uninit_slice<'a>(self) -> Option<&'a [MaybeUninit<T>]> {
16691669
if self.is_null() {
16701670
None

core/src/ptr/mut_ptr.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ impl<T: ?Sized> *mut T {
261261
/// }
262262
/// ```
263263
#[stable(feature = "ptr_as_ref", since = "1.9.0")]
264-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
264+
#[rustc_const_unstable(feature = "const_ptr_is_null", issue = "74939")]
265265
#[inline]
266266
pub const unsafe fn as_ref<'a>(self) -> Option<&'a T> {
267267
// SAFETY: the caller must guarantee that `self` is valid for a
@@ -295,7 +295,7 @@ impl<T: ?Sized> *mut T {
295295
/// ```
296296
// FIXME: mention it in the docs for `as_ref` and `as_uninit_ref` once stabilized.
297297
#[unstable(feature = "ptr_as_ref_unchecked", issue = "122034")]
298-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
298+
#[rustc_const_unstable(feature = "ptr_as_ref_unchecked", issue = "122034")]
299299
#[inline]
300300
#[must_use]
301301
pub const unsafe fn as_ref_unchecked<'a>(self) -> &'a T {
@@ -334,7 +334,7 @@ impl<T: ?Sized> *mut T {
334334
/// ```
335335
#[inline]
336336
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
337-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
337+
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
338338
pub const unsafe fn as_uninit_ref<'a>(self) -> Option<&'a MaybeUninit<T>>
339339
where
340340
T: Sized,
@@ -580,7 +580,7 @@ impl<T: ?Sized> *mut T {
580580
/// println!("{s:?}"); // It'll print: "[4, 2, 3]".
581581
/// ```
582582
#[stable(feature = "ptr_as_ref", since = "1.9.0")]
583-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
583+
#[rustc_const_unstable(feature = "const_ptr_is_null", issue = "74939")]
584584
#[inline]
585585
pub const unsafe fn as_mut<'a>(self) -> Option<&'a mut T> {
586586
// SAFETY: the caller must guarantee that `self` is be valid for
@@ -616,7 +616,7 @@ impl<T: ?Sized> *mut T {
616616
/// ```
617617
// FIXME: mention it in the docs for `as_mut` and `as_uninit_mut` once stabilized.
618618
#[unstable(feature = "ptr_as_ref_unchecked", issue = "122034")]
619-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
619+
#[rustc_const_unstable(feature = "ptr_as_ref_unchecked", issue = "122034")]
620620
#[inline]
621621
#[must_use]
622622
pub const unsafe fn as_mut_unchecked<'a>(self) -> &'a mut T {
@@ -639,7 +639,7 @@ impl<T: ?Sized> *mut T {
639639
/// the pointer is [convertible to a reference](crate::ptr#pointer-to-reference-conversion).
640640
#[inline]
641641
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
642-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
642+
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
643643
pub const unsafe fn as_uninit_mut<'a>(self) -> Option<&'a mut MaybeUninit<T>>
644644
where
645645
T: Sized,
@@ -2016,7 +2016,7 @@ impl<T> *mut [T] {
20162016
/// [allocated object]: crate::ptr#allocated-object
20172017
#[inline]
20182018
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
2019-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
2019+
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
20202020
pub const unsafe fn as_uninit_slice<'a>(self) -> Option<&'a [MaybeUninit<T>]> {
20212021
if self.is_null() {
20222022
None
@@ -2068,7 +2068,7 @@ impl<T> *mut [T] {
20682068
/// [allocated object]: crate::ptr#allocated-object
20692069
#[inline]
20702070
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
2071-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
2071+
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
20722072
pub const unsafe fn as_uninit_slice_mut<'a>(self) -> Option<&'a mut [MaybeUninit<T>]> {
20732073
if self.is_null() {
20742074
None

core/src/ptr/non_null.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ impl<T: Sized> NonNull<T> {
133133
#[inline]
134134
#[must_use]
135135
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
136-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
136+
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
137137
pub const unsafe fn as_uninit_ref<'a>(self) -> &'a MaybeUninit<T> {
138138
// SAFETY: the caller must guarantee that `self` meets all the
139139
// requirements for a reference.
@@ -157,7 +157,7 @@ impl<T: Sized> NonNull<T> {
157157
#[inline]
158158
#[must_use]
159159
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
160-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
160+
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
161161
pub const unsafe fn as_uninit_mut<'a>(self) -> &'a mut MaybeUninit<T> {
162162
// SAFETY: the caller must guarantee that `self` meets all the
163163
// requirements for a reference.
@@ -1563,7 +1563,7 @@ impl<T> NonNull<[T]> {
15631563
#[inline]
15641564
#[must_use]
15651565
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
1566-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
1566+
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
15671567
pub const unsafe fn as_uninit_slice<'a>(self) -> &'a [MaybeUninit<T>] {
15681568
// SAFETY: the caller must uphold the safety contract for `as_uninit_slice`.
15691569
unsafe { slice::from_raw_parts(self.cast().as_ptr(), self.len()) }
@@ -1628,7 +1628,7 @@ impl<T> NonNull<[T]> {
16281628
#[inline]
16291629
#[must_use]
16301630
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
1631-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
1631+
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
16321632
pub const unsafe fn as_uninit_slice_mut<'a>(self) -> &'a mut [MaybeUninit<T>] {
16331633
// SAFETY: the caller must uphold the safety contract for `as_uninit_slice_mut`.
16341634
unsafe { slice::from_raw_parts_mut(self.cast().as_ptr(), self.len()) }

std/src/io/error.rs

+16-16
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,10 @@ pub enum ErrorKind {
223223
#[stable(feature = "rust1", since = "1.0.0")]
224224
ConnectionReset,
225225
/// The remote host is not reachable.
226-
#[unstable(feature = "io_error_more", issue = "86442")]
226+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
227227
HostUnreachable,
228228
/// The network containing the remote host is not reachable.
229-
#[unstable(feature = "io_error_more", issue = "86442")]
229+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
230230
NetworkUnreachable,
231231
/// The connection was aborted (terminated) by the remote server.
232232
#[stable(feature = "rust1", since = "1.0.0")]
@@ -243,7 +243,7 @@ pub enum ErrorKind {
243243
#[stable(feature = "rust1", since = "1.0.0")]
244244
AddrNotAvailable,
245245
/// The system's networking is down.
246-
#[unstable(feature = "io_error_more", issue = "86442")]
246+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
247247
NetworkDown,
248248
/// The operation failed because a pipe was closed.
249249
#[stable(feature = "rust1", since = "1.0.0")]
@@ -259,18 +259,18 @@ pub enum ErrorKind {
259259
///
260260
/// For example, a filesystem path was specified where one of the intermediate directory
261261
/// components was, in fact, a plain file.
262-
#[unstable(feature = "io_error_more", issue = "86442")]
262+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
263263
NotADirectory,
264264
/// The filesystem object is, unexpectedly, a directory.
265265
///
266266
/// A directory was specified when a non-directory was expected.
267-
#[unstable(feature = "io_error_more", issue = "86442")]
267+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
268268
IsADirectory,
269269
/// A non-empty directory was specified where an empty directory was expected.
270-
#[unstable(feature = "io_error_more", issue = "86442")]
270+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
271271
DirectoryNotEmpty,
272272
/// The filesystem or storage medium is read-only, but a write operation was attempted.
273-
#[unstable(feature = "io_error_more", issue = "86442")]
273+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
274274
ReadOnlyFilesystem,
275275
/// Loop in the filesystem or IO subsystem; often, too many levels of symbolic links.
276276
///
@@ -285,7 +285,7 @@ pub enum ErrorKind {
285285
///
286286
/// With some network filesystems, notably NFS, an open file (or directory) can be invalidated
287287
/// by problems with the network or server.
288-
#[unstable(feature = "io_error_more", issue = "86442")]
288+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
289289
StaleNetworkFileHandle,
290290
/// A parameter was incorrect.
291291
#[stable(feature = "rust1", since = "1.0.0")]
@@ -319,13 +319,13 @@ pub enum ErrorKind {
319319
/// The underlying storage (typically, a filesystem) is full.
320320
///
321321
/// This does not include out of quota errors.
322-
#[unstable(feature = "io_error_more", issue = "86442")]
322+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
323323
StorageFull,
324324
/// Seek on unseekable file.
325325
///
326326
/// Seeking was attempted on an open file handle which is not suitable for seeking - for
327327
/// example, on Unix, a named pipe opened with `File::open`.
328-
#[unstable(feature = "io_error_more", issue = "86442")]
328+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
329329
NotSeekable,
330330
/// Filesystem quota was exceeded.
331331
#[unstable(feature = "io_error_more", issue = "86442")]
@@ -335,30 +335,30 @@ pub enum ErrorKind {
335335
/// This might arise from a hard limit of the underlying filesystem or file access API, or from
336336
/// an administratively imposed resource limitation. Simple disk full, and out of quota, have
337337
/// their own errors.
338-
#[unstable(feature = "io_error_more", issue = "86442")]
338+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
339339
FileTooLarge,
340340
/// Resource is busy.
341-
#[unstable(feature = "io_error_more", issue = "86442")]
341+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
342342
ResourceBusy,
343343
/// Executable file is busy.
344344
///
345345
/// An attempt was made to write to a file which is also in use as a running program. (Not all
346346
/// operating systems detect this situation.)
347-
#[unstable(feature = "io_error_more", issue = "86442")]
347+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
348348
ExecutableFileBusy,
349349
/// Deadlock (avoided).
350350
///
351351
/// A file locking operation would result in deadlock. This situation is typically detected, if
352352
/// at all, on a best-effort basis.
353-
#[unstable(feature = "io_error_more", issue = "86442")]
353+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
354354
Deadlock,
355355
/// Cross-device or cross-filesystem (hard) link or rename.
356356
#[unstable(feature = "io_error_more", issue = "86442")]
357357
CrossesDevices,
358358
/// Too many (hard) links to the same filesystem object.
359359
///
360360
/// The filesystem does not support making so many hardlinks to the same file.
361-
#[unstable(feature = "io_error_more", issue = "86442")]
361+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
362362
TooManyLinks,
363363
/// A filename was invalid.
364364
///
@@ -369,7 +369,7 @@ pub enum ErrorKind {
369369
///
370370
/// When trying to run an external program, a system or process limit on the size of the
371371
/// arguments would have been exceeded.
372-
#[unstable(feature = "io_error_more", issue = "86442")]
372+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
373373
ArgumentListTooLong,
374374
/// This operation was interrupted.
375375
///

std/src/sys/pal/unix/stack_overflow.rs

+11-4
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ impl Drop for Handler {
3232
target_os = "macos",
3333
target_os = "netbsd",
3434
target_os = "openbsd",
35-
target_os = "solaris"
35+
target_os = "solaris",
36+
target_os = "illumos",
3637
))]
3738
mod imp {
3839
#[cfg(not(all(target_os = "linux", target_env = "gnu")))]
@@ -280,7 +281,7 @@ mod imp {
280281
libc::SIGSTKSZ
281282
}
282283

283-
#[cfg(target_os = "solaris")]
284+
#[cfg(any(target_os = "solaris", target_os = "illumos"))]
284285
unsafe fn get_stack_start() -> Option<*mut libc::c_void> {
285286
let mut current_stack: libc::stack_t = crate::mem::zeroed();
286287
assert_eq!(libc::stack_getbounds(&mut current_stack), 0);
@@ -486,7 +487,12 @@ mod imp {
486487
Some(guardaddr..guardaddr + page_size)
487488
}
488489

489-
#[cfg(any(target_os = "macos", target_os = "openbsd", target_os = "solaris"))]
490+
#[cfg(any(
491+
target_os = "macos",
492+
target_os = "openbsd",
493+
target_os = "solaris",
494+
target_os = "illumos",
495+
))]
490496
// FIXME: I am probably not unsafe.
491497
unsafe fn current_guard() -> Option<Range<usize>> {
492498
let stackptr = get_stack_start()?;
@@ -569,7 +575,8 @@ mod imp {
569575
target_os = "macos",
570576
target_os = "netbsd",
571577
target_os = "openbsd",
572-
target_os = "solaris"
578+
target_os = "solaris",
579+
target_os = "illumos",
573580
)))]
574581
mod imp {
575582
pub unsafe fn init() {}

0 commit comments

Comments
 (0)