Skip to content

Commit a193eb6

Browse files
committed
Auto merge of rust-lang#94628 - Dylan-DPC:rollup-v2slupe, r=Dylan-DPC
Rollup of 5 pull requests Successful merges: - rust-lang#94362 (Add well known values to `--check-cfg` implementation) - rust-lang#94577 (only disable SIMD for doctests in Miri (not for the stdlib build itself)) - rust-lang#94595 (Fix invalid `unresolved imports` errors for a single-segment import) - rust-lang#94596 (Delay bug in expr adjustment when check_expr is called multiple times) - rust-lang#94618 (Don't round stack size up for created threads in Windows) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents cd1dfc2 + f467afa commit a193eb6

File tree

5 files changed

+8
-11
lines changed

5 files changed

+8
-11
lines changed

core/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,12 +408,12 @@ pub mod arch {
408408
#[allow(missing_debug_implementations, dead_code, unsafe_op_in_unsafe_fn, unused_unsafe)]
409409
#[allow(rustdoc::bare_urls)]
410410
#[unstable(feature = "portable_simd", issue = "86656")]
411-
#[cfg(not(all(miri, doctest)))] // Miri does not support all SIMD intrinsics
411+
#[cfg(not(all(miri, doctest)))] // Skip SIMD doctests in Miri
412412
mod core_simd;
413413

414414
#[doc = include_str!("../../portable-simd/crates/core_simd/src/core_simd_docs.md")]
415415
#[unstable(feature = "portable_simd", issue = "86656")]
416-
#[cfg(not(all(miri, doctest)))] // Miri does not support all SIMD intrinsics
416+
#[cfg(not(all(miri, doctest)))] // Skip SIMD doctests in Miri
417417
pub mod simd {
418418
#[unstable(feature = "portable_simd", issue = "86656")]
419419
pub use crate::core_simd::simd::*;

core/src/slice/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use crate::option::Option::{None, Some};
1616
use crate::ptr;
1717
use crate::result::Result;
1818
use crate::result::Result::{Err, Ok};
19-
#[cfg(not(miri))] // Miri does not support all SIMD intrinsics
19+
#[cfg(not(all(miri, doctest)))] // Miri skips SIMD doctests
2020
use crate::simd::{self, Simd};
2121
use crate::slice;
2222

@@ -3540,7 +3540,7 @@ impl<T> [T] {
35403540
/// assert_eq!(basic_simd_sum(&numbers[1..99]), 4949.0);
35413541
/// ```
35423542
#[unstable(feature = "portable_simd", issue = "86656")]
3543-
#[cfg(not(miri))] // Miri does not support all SIMD intrinsics
3543+
#[cfg(not(all(miri, doctest)))] // Miri skips SIMD doctests
35443544
pub fn as_simd<const LANES: usize>(&self) -> (&[T], &[Simd<T, LANES>], &[T])
35453545
where
35463546
Simd<T, LANES>: AsRef<[T; LANES]>,
@@ -3584,7 +3584,7 @@ impl<T> [T] {
35843584
/// be lifted in a way that would make it possible to see panics from this
35853585
/// method for something like `LANES == 3`.
35863586
#[unstable(feature = "portable_simd", issue = "86656")]
3587-
#[cfg(not(miri))] // Miri does not support all SIMD intrinsics
3587+
#[cfg(not(all(miri, doctest)))] // Miri skips SIMD doctests
35883588
pub fn as_simd_mut<const LANES: usize>(&mut self) -> (&mut [T], &mut [Simd<T, LANES>], &mut [T])
35893589
where
35903590
Simd<T, LANES>: AsMut<[T; LANES]>,

core/tests/simd.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![cfg(not(miri))] // Miri does not support all SIMD intrinsics
2-
31
use core::simd::f32x4;
42

53
#[test]

core/tests/slice.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2457,9 +2457,11 @@ take_tests! {
24572457
(take_last_mut_empty, (), None, &mut []),
24582458
}
24592459

2460+
#[cfg(not(miri))] // unused in Miri
24602461
const EMPTY_MAX: &'static [()] = &[(); usize::MAX];
24612462

24622463
// can't be a constant due to const mutability rules
2464+
#[cfg(not(miri))] // unused in Miri
24632465
macro_rules! empty_max_mut {
24642466
() => {
24652467
&mut [(); usize::MAX] as _

std/src/sys/windows/thread.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,9 @@ impl Thread {
3030
// PTHREAD_STACK_MIN bytes big. Windows has no such lower limit, it's
3131
// just that below a certain threshold you can't do anything useful.
3232
// That threshold is application and architecture-specific, however.
33-
// Round up to the next 64 kB because that's what the NT kernel does,
34-
// might as well make it explicit.
35-
let stack_size = (stack + 0xfffe) & (!0xfffe);
3633
let ret = c::CreateThread(
3734
ptr::null_mut(),
38-
stack_size,
35+
stack,
3936
thread_start,
4037
p as *mut _,
4138
c::STACK_SIZE_PARAM_IS_A_RESERVATION,

0 commit comments

Comments
 (0)